forked from google/zetasql
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. support ASTSelectIntoStatement 2. allow guess ASTSelectIntoStatement with ASTQueryStatement 3. update keywords
- Loading branch information
1 parent
ab938ba
commit 4f90daa
Showing
11 changed files
with
173 additions
and
6 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
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,100 @@ | ||
select col1, col2 from t1 into outfile 'data.csv'; | ||
-- | ||
SelectIntoStatement [0-49] | ||
Query [0-25] | ||
Select [0-25] | ||
SelectList [7-17] | ||
SelectColumn [7-11] | ||
PathExpression [7-11] | ||
Identifier(col1) [7-11] | ||
SelectColumn [13-17] | ||
PathExpression [13-17] | ||
Identifier(col2) [13-17] | ||
FromClause [18-25] | ||
TablePathExpression [23-25] | ||
PathExpression [23-25] | ||
Identifier(t1) [23-25] | ||
StringLiteral('data.csv') [39-49] | ||
-- | ||
SELECT | ||
col1, | ||
col2 | ||
FROM | ||
t1 | ||
INTO OUTFILE 'data.csv' | ||
== | ||
|
||
select col1, col2 from t1 into outfile 'data.csv' options (charset = 'utf-8'); | ||
-- | ||
SelectIntoStatement [0-77] | ||
Query [0-25] | ||
Select [0-25] | ||
SelectList [7-17] | ||
SelectColumn [7-11] | ||
PathExpression [7-11] | ||
Identifier(col1) [7-11] | ||
SelectColumn [13-17] | ||
PathExpression [13-17] | ||
Identifier(col2) [13-17] | ||
FromClause [18-25] | ||
TablePathExpression [23-25] | ||
PathExpression [23-25] | ||
Identifier(t1) [23-25] | ||
StringLiteral('data.csv') [39-49] | ||
OptionsList [58-77] | ||
OptionsEntry [59-76] | ||
Identifier(charset) [59-66] | ||
StringLiteral('utf-8') [69-76] | ||
-- | ||
SELECT | ||
col1, | ||
col2 | ||
FROM | ||
t1 | ||
INTO OUTFILE 'data.csv' OPTIONS(charset = 'utf-8') | ||
== | ||
|
||
select col1, col2 from db1.t1 into outfile 'data.csv' options (charset = 'utf-8'); | ||
-- | ||
SelectIntoStatement [0-81] | ||
Query [0-29] | ||
Select [0-29] | ||
SelectList [7-17] | ||
SelectColumn [7-11] | ||
PathExpression [7-11] | ||
Identifier(col1) [7-11] | ||
SelectColumn [13-17] | ||
PathExpression [13-17] | ||
Identifier(col2) [13-17] | ||
FromClause [18-29] | ||
TablePathExpression [23-29] | ||
PathExpression [23-29] | ||
Identifier(db1) [23-26] | ||
Identifier(t1) [27-29] | ||
StringLiteral('data.csv') [43-53] | ||
OptionsList [62-81] | ||
OptionsEntry [63-80] | ||
Identifier(charset) [63-70] | ||
StringLiteral('utf-8') [73-80] | ||
-- | ||
SELECT | ||
col1, | ||
col2 | ||
FROM | ||
db1.t1 | ||
INTO OUTFILE 'data.csv' OPTIONS(charset = 'utf-8') | ||
== | ||
|
||
select col1, col2 from db1.t1 into outfile; | ||
-- | ||
ERROR: Syntax error: Expected string literal but got ";" [at 1:43] | ||
select col1, col2 from db1.t1 into outfile; | ||
^ | ||
== | ||
|
||
select col1, col2 from db1.t1 into outfile options (charset = 'utf-8'); | ||
-- | ||
ERROR: Syntax error: Expected string literal but got keyword OPTIONS [at 1:44] | ||
select col1, col2 from db1.t1 into outfile options (charset = 'utf-8'); | ||
^ | ||
== |
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