-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(parser): fix parsing timestamp number (#17080)
Signed-off-by: Runji Wang <[email protected]>
- Loading branch information
1 parent
d764ef3
commit 4001aba
Showing
3 changed files
with
59 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# This file is automatically generated by `src/sqlparser/tests/parser_test.rs`. | ||
- input: select * from t1 left join t2 FOR SYSTEM_TIME AS OF PROCTIME() on a1 = a2; | ||
formatted_sql: SELECT * FROM t1 LEFT JOIN t2 FOR SYSTEM_TIME AS OF PROCTIME() ON a1 = a2 | ||
- input: select * from t1 left join t2 FOR SYSTEM_TIME AS OF NOW() on a1 = a2; | ||
formatted_sql: SELECT * FROM t1 LEFT JOIN t2 FOR SYSTEM_TIME AS OF PROCTIME() ON a1 = a2 | ||
- input: select * from t1 left join t2 FOR SYSTEM_TIME AS OF 1 on a1 = a2; | ||
formatted_sql: SELECT * FROM t1 LEFT JOIN t2 FOR SYSTEM_TIME AS OF 1 ON a1 = a2 | ||
- input: select * from t1 left join t2 FOR SYSTEM_TIME AS OF 'string' on a1 = a2; | ||
formatted_sql: SELECT * FROM t1 LEFT JOIN t2 FOR SYSTEM_TIME AS OF 'string' ON a1 = a2 | ||
- input: select * from t1 left join t2 FOR SYSTEM_TIME AS OF PROCTIME on a1 = a2; | ||
error_msg: |- | ||
sql parser error: expected proctime(), now(), number or string | ||
LINE 1: select * from t1 left join t2 FOR SYSTEM_TIME AS OF PROCTIME on a1 = a2; | ||
^ | ||
- input: select * from t1 left join t2 FOR SYSTEM_VERSION AS OF 1 on a1 = a2; | ||
formatted_sql: SELECT * FROM t1 LEFT JOIN t2 FOR SYSTEM_VERSION AS OF 1 ON a1 = a2 | ||
- input: select * from t1 left join t2 FOR SYSTEM_VERSION AS OF 'string' on a1 = a2; | ||
formatted_sql: SELECT * FROM t1 LEFT JOIN t2 FOR SYSTEM_VERSION AS OF 'string' ON a1 = a2 | ||
- input: select * from t1 left join t2 FOR SYSTEM_VERSION AS OF PROCTIME() on a1 = a2; | ||
error_msg: |- | ||
sql parser error: expected number or string | ||
LINE 1: select * from t1 left join t2 FOR SYSTEM_VERSION AS OF PROCTIME() on a1 = a2; | ||
^ |