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

Cannot parse select 1 in () #1525

Open
adriangb opened this issue Nov 15, 2024 · 3 comments
Open

Cannot parse select 1 in () #1525

adriangb opened this issue Nov 15, 2024 · 3 comments

Comments

@adriangb
Copy link

I'm not sure if this should parse, Postgres for example also fails, but if possible it would be nice if this at least parsed if not executed correctly.

I tested this in datafusion-cli, but originally found it using Rust:

> SELECT 1 in ();  🤔 Invalid statement: sql parser error: Expected: an expression:, found: )
@git-hulk
Copy link
Member

@alamb @iffyio The empty () should be disallowed in many dialects, but I'm not sure if it's good to add an option to allow this in the SQL parser. This seems reasonable from my side since this behavior can be determined by the downstream, and what we should guarantee is that it won't break the old behavior.

@iffyio
Copy link
Contributor

iffyio commented Nov 17, 2024

Ah is the In () syntax supported by some of the current dialects we mean or?

@alamb
Copy link
Contributor

alamb commented Nov 18, 2024

Possibly some good guidelines: https://github.com/apache/datafusion-sqlparser-rs?tab=readme-ov-file#syntax-vs-semantics

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants