-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support of parsing map literal and query parameter (#94)
- Loading branch information
Showing
7 changed files
with
616 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
parser/testdata/query/format/select_with_query_parameter.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
-- Origin SQL: | ||
SET param_a = 13; | ||
SET param_b = 'str'; | ||
SET param_c = '2022-08-04 18:30:53'; | ||
SET param_d = {'10': [11, 12], '13': [14, 15]}; | ||
|
||
SELECT | ||
{a: UInt32}, | ||
{b: String}, | ||
{c: DateTime}, | ||
{d: Map(String, Array(UInt8))}; | ||
|
||
SELECT * FROM clickhouse WHERE tenant_id = {tenant_id: String}; | ||
|
||
|
||
-- Format SQL: | ||
SET param_a=13; | ||
SET param_b='str'; | ||
SET param_c='2022-08-04 18:30:53'; | ||
SET param_d={'10': [11, 12], '13': [14, 15]}; | ||
|
||
SELECT | ||
{a: UInt32}, | ||
{b: String}, | ||
{c: DateTime}, | ||
{d: Map(String,Array(UInt8))}; | ||
|
||
SELECT | ||
* | ||
FROM | ||
clickhouse | ||
WHERE | ||
tenant_id = {tenant_id: String}; |
Oops, something went wrong.