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

Allow trailing comma in FROM clause #242

Open
scsmithr opened this issue Sep 18, 2024 · 3 comments
Open

Allow trailing comma in FROM clause #242

scsmithr opened this issue Sep 18, 2024 · 3 comments

Comments

@scsmithr
Copy link
Member

eg

    SELECT
        l_suppkey AS supplier_no,
        sum(l_extendedprice * (1 - l_discount)) AS total_revenue
    FROM
        '../submodules/testdata/tpch_sf0.1/lineitem.parquet'  lineitem,
    WHERE
        l_shipdate >= CAST('1996-01-01' AS date)
      AND l_shipdate < CAST('1996-04-01' AS date)
    GROUP BY
        supplier_no

Current errors with

Expected RightParen, got Some(TokenWithLocation { token: GtEq, line: 0, col: 0 })

@tychoish
Copy link
Contributor

what about other clauses which might have trailing commas (select, where, etc.) ?

@scsmithr
Copy link
Member Author

Trailing comma in select already works. Commas in where wouldn't be valid. Order by/ group by could allow trailing commas too.

@tychoish
Copy link
Contributor

should add group by at the same time if we get there.

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

2 participants