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

fix: support tailing commas in SQL #2913

Merged
merged 2 commits into from
Dec 12, 2023
Merged

fix: support tailing commas in SQL #2913

merged 2 commits into from
Dec 12, 2023

Conversation

Taylor-lagrange
Copy link
Contributor

I hereby agree to the terms of the GreptimeDB CLA

What's changed and what's your intention?

Because some bug in sqlparser, sql like SELECT foo, bar, FROM baz with tailing commas will be wrongly parse to SELECT foo, bar, FROM AS baz

Enable trailing_commas in sqlparser to avoid such error.

Checklist

  • I have written the necessary rustdoc comments.
  • I have added the necessary unit tests and integration tests.

Refer to a related PR or issue link (optional)

Copy link

codecov bot commented Dec 12, 2023

Codecov Report

Merging #2913 (71cb0db) into develop (47e5154) will decrease coverage by 0.58%.
Report is 1 commits behind head on develop.
The diff coverage is 100.00%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #2913      +/-   ##
===========================================
- Coverage    85.11%   84.53%   -0.58%     
===========================================
  Files          756      756              
  Lines       119511   119513       +2     
===========================================
- Hits        101719   101028     -691     
- Misses       17792    18485     +693     

Copy link
Member

@waynexia waynexia left a comment

Choose a reason for hiding this comment

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

LGTM

@waynexia waynexia requested a review from killme2008 December 12, 2023 09:37
Copy link
Member

@WenyXu WenyXu left a comment

Choose a reason for hiding this comment

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

LGTM,

tests-integration/src/tests/promql_test.rs Show resolved Hide resolved
@waynexia waynexia added this pull request to the merge queue Dec 12, 2023
Merged via the queue into GreptimeTeam:develop with commit 3463555 Dec 12, 2023
13 checks passed
@Taylor-lagrange Taylor-lagrange deleted the fix-sql-tailing-comma branch December 13, 2023 02:15
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.

3 participants