Support cte statement for antlr4 syntax file #39810

This commit is contained in:
qianmoQ 2022-08-02 17:17:08 +08:00
parent 5ae7f339c4
commit 094b28b869

View File

@ -26,6 +26,20 @@ query
| truncateStmt // DDL | truncateStmt // DDL
| useStmt | useStmt
| watchStmt | watchStmt
| ctes? selectStmt
;
// CTE statement
ctes
: WITH namedQuery (',' namedQuery)*
;
namedQuery
: name=identifier (columnAliases)? AS '(' query ')'
;
columnAliases
: '(' identifier (',' identifier)* ')'
; ;
// ALTER statement // ALTER statement