Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQL functions are case sensitive #3056

Closed
ukclivecox opened this issue Oct 16, 2024 · 0 comments · Fixed by #3063
Closed

SQL functions are case sensitive #3056

ukclivecox opened this issue Oct 16, 2024 · 0 comments · Fixed by #3063
Assignees
Labels
bug Something isn't working sql

Comments

@ukclivecox
Copy link

ukclivecox commented Oct 16, 2024

Describe the bug

The count function in SQL is case sensitive and COUNT fails. But SQL functions are generally considered to be case-insensitive.

To Reproduce

import datetime

df = daft.from_pydict(
    {
        "integers": [1, 2, 3, 4],
        "floats": [1.5, 2.5, 3.5, 4.5],
        "bools": [True, True, False, False],
        "strings": ["a", "b", "c", "d"],
        "bytes": [b"a", b"b", b"c", b"d"],
        "dates": [
            datetime.date(1994, 1, 1),
            datetime.date(1994, 1, 2),
            datetime.date(1994, 1, 3),
            datetime.date(1994, 1, 4),
        ],
        "lists": [[1, 1, 1], [2, 2, 2], [3, 3, 3], [4, 4, 4]],
        "nulls": [None, None, None, None],
    }
)

df = daft.sql("SELECT COUNT(*) FROM df").show()

This causes an exception

InvalidSQLException: Unsupported SQL: 'Function `COUNT` not found'

Expected behavior

Both count(*) and COUNT(*) should work.

Component(s)

SQL

Additional context

Version 0.3.8

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working sql
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants