Skip to content

Make GenericDialect support trailing commas in projections #1921

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

simonvandel
Copy link
Contributor

@simonvandel simonvandel commented Jul 2, 2025

Similar to #1911.

The docs for GenericDialect says that is can be permissive, so I thought it could support trailing commas in projections.

This would help a bit on the "friendly sql" issue
apache/datafusion#14514

I removed a test-case that tested that ´GenericDialectdid not support trailing commas in projections. Positive tests for trailing commas still exists in theparse_projection_trailing_comma` test

Similar to apache#1911.

The docs for GenericDialect says that is can be permissive, so I thought
it could support trailing commas in projections.

This would help a bit on the "friendly sql" issue
apache/datafusion#14514
@simonvandel simonvandel force-pushed the generic-support-trailing-comma branch from 0a261dd to 44ceeda Compare July 2, 2025 19:46
let trailing_commas = TestedDialects::new(vec![Box::new(GenericDialect {})]);

assert_eq!(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could we instead change this to use a dialect like postgres that doesnt support trailing commas? thinking that would let us keep the negative test around.

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

Successfully merging this pull request may close these issues.

2 participants