apache / apache/datafusion-sqlparser-rs

Cannot parse `select 1 in ()`

Open
#1,525 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

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: )
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing `SELECT 1 in ();` in datafusion-cli and inspect the SQL parser entry point that reports the expected-expression error. Confirm the intended treatment of an empty IN list, then add coverage for the chosen parsing behavior; done means the parser test and CLI behavior agree with that decision.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.