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

Add test for using a dollar sign in a parameter name #53

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Add test for using a dollar sign in a parameter name
Already supported, but in discussion about parameters,
realized that we may want parameters to stand out from other elements.
This test ensures that this use case is supported.
(I was surprised to discover that Clickhouse
also supports dollar signs in their identifiers.)
  • Loading branch information
zombiezen committed Jun 11, 2024
commit addcee2bc5e4fb603e4b5a8da0069829f63ee3fc
2 changes: 2 additions & 0 deletions testdata/Goldens/ParamsDollarSign/input.pql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Tokens
| where Kind == $desiredKind
8 changes: 8 additions & 0 deletions testdata/Goldens/ParamsDollarSign/options.jwcc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"parameters": {
"$desiredKind": {
"clickhouse": "{$desiredKind: Int32}",
"value": "1",
},
},
}
2 changes: 2 additions & 0 deletions testdata/Goldens/ParamsDollarSign/output.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Kind,TokenConstant
1,TokenIdentifier
1 change: 1 addition & 0 deletions testdata/Goldens/ParamsDollarSign/output.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
SELECT * FROM "Tokens" WHERE coalesce("Kind" = {$desiredKind: Int32}, FALSE);