-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix column index style wasn't supported in query (#119)
- Loading branch information
Showing
7 changed files
with
148 additions
and
9 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
-- Origin SQL: | ||
SELECT foo, bar.1, foo.2 FROM foo ARRAY JOIN m as bar | ||
|
||
-- Format SQL: | ||
SELECT foo, bar.1, foo.2 FROM foo ARRAY JOIN m AS bar; |
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
120 changes: 120 additions & 0 deletions
120
parser/testdata/query/output/select_with_number_field.sql.golden.json
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,120 @@ | ||
[ | ||
{ | ||
"SelectPos": 0, | ||
"StatementEnd": 53, | ||
"With": null, | ||
"Top": null, | ||
"SelectItems": [ | ||
{ | ||
"Expr": { | ||
"Name": "foo", | ||
"QuoteType": 1, | ||
"NamePos": 7, | ||
"NameEnd": 10 | ||
}, | ||
"Modifiers": [], | ||
"Alias": null | ||
}, | ||
{ | ||
"Expr": { | ||
"Object": { | ||
"Name": "bar", | ||
"QuoteType": 1, | ||
"NamePos": 12, | ||
"NameEnd": 15 | ||
}, | ||
"Operation": ".", | ||
"Index": { | ||
"NumPos": 16, | ||
"NumEnd": 17, | ||
"Literal": "1", | ||
"Base": 10 | ||
} | ||
}, | ||
"Modifiers": [], | ||
"Alias": null | ||
}, | ||
{ | ||
"Expr": { | ||
"Object": { | ||
"Name": "foo", | ||
"QuoteType": 1, | ||
"NamePos": 19, | ||
"NameEnd": 22 | ||
}, | ||
"Operation": ".", | ||
"Index": { | ||
"NumPos": 23, | ||
"NumEnd": 24, | ||
"Literal": "2", | ||
"Base": 10 | ||
} | ||
}, | ||
"Modifiers": [], | ||
"Alias": null | ||
} | ||
], | ||
"From": { | ||
"FromPos": 25, | ||
"Expr": { | ||
"Table": { | ||
"TablePos": 30, | ||
"TableEnd": 33, | ||
"Alias": null, | ||
"Expr": { | ||
"Database": null, | ||
"Table": { | ||
"Name": "foo", | ||
"QuoteType": 1, | ||
"NamePos": 30, | ||
"NameEnd": 33 | ||
} | ||
}, | ||
"HasFinal": false | ||
}, | ||
"StatementEnd": 33, | ||
"SampleRatio": null, | ||
"HasFinal": false | ||
} | ||
}, | ||
"ArrayJoin": { | ||
"ArrayPos": 34, | ||
"Type": "", | ||
"Expr": { | ||
"ListPos": 45, | ||
"ListEnd": 53, | ||
"HasDistinct": false, | ||
"Items": [ | ||
{ | ||
"Expr": { | ||
"Name": "m", | ||
"QuoteType": 1, | ||
"NamePos": 45, | ||
"NameEnd": 46 | ||
}, | ||
"Alias": { | ||
"Name": "bar", | ||
"QuoteType": 1, | ||
"NamePos": 50, | ||
"NameEnd": 53 | ||
} | ||
} | ||
] | ||
} | ||
}, | ||
"Window": null, | ||
"Prewhere": null, | ||
"Where": null, | ||
"GroupBy": null, | ||
"WithTotal": false, | ||
"Having": null, | ||
"OrderBy": null, | ||
"LimitBy": null, | ||
"Limit": null, | ||
"Settings": null, | ||
"Format": null, | ||
"UnionAll": null, | ||
"UnionDistinct": null, | ||
"Except": null | ||
} | ||
] |
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 @@ | ||
SELECT foo, bar.1, foo.2 FROM foo ARRAY JOIN m as bar |