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 identifier starts with $ should be regarded as a placeholder in SQLite #1402

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

git-hulk
Copy link
Member

Currently, $var would be parsed as an identifier instead of a placeholder in SQLite dialect, which is unexpected from the SQLite's documentation: https://www.sqlite.org/lang_expr.html#varparam.

This relates to the issue comment: #291 (comment)

… SQLite

Currently, `$var` would be parsed as an identifier instead of
a placeholder in SQLite dialect, which is unexpected from the SQLite's
documentation: https://www.sqlite.org/lang_expr.html#varparam.

This relates to the issue comment: apache#291 (comment)
@git-hulk
Copy link
Member Author

cc @iffyio

@coveralls
Copy link

Pull Request Test Coverage Report for Build 10576766890

Details

  • 6 of 6 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.002%) to 89.209%

Totals Coverage Status
Change from base Build 10566352051: 0.002%
Covered Lines: 28612
Relevant Lines: 32073

💛 - Coveralls

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

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

LGTM! cc @alamb

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

❤️

Thanks @git-hulk and @iffyio

@alamb alamb merged commit df86f25 into apache:main Sep 1, 2024
10 checks passed
ayman-sigma pushed a commit to sigmacomputing/sqlparser-rs that referenced this pull request Nov 19, 2024
hansott added a commit to hansott/datafusion-sqlparser-rs that referenced this pull request Dec 26, 2024
Relevant: apache#1402

SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .mode box
sqlite> .nullvalue NULL
sqlite> SELECT $$, $$ABC$$, $ABC$, $ABC;
┌──────┬─────────┬───────┬──────┐
│  $$  │ $$ABC$$ │ $ABC$ │ $ABC │
├──────┼─────────┼───────┼──────┤
│ NULL │ NULL    │ NULL  │ NULL │
└──────┴─────────┴───────┴──────┘
hansott added a commit to AikidoSec/datafusion-sqlparser-rs that referenced this pull request Dec 30, 2024
Relevant: apache#1402

SQLite version 3.43.2 2023-10-10 13:08:14
Enter ".help" for usage hints.
Connected to a transient in-memory database.
Use ".open FILENAME" to reopen on a persistent database.
sqlite> .mode box
sqlite> .nullvalue NULL
sqlite> SELECT $$, $$ABC$$, $ABC$, $ABC;
┌──────┬─────────┬───────┬──────┐
│  $$  │ $$ABC$$ │ $ABC$ │ $ABC │
├──────┼─────────┼───────┼──────┤
│ NULL │ NULL    │ NULL  │ NULL │
└──────┴─────────┴───────┴──────┘
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.

4 participants