-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql parser support clickHouse #31226
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- The PR did not pass the code formatting validation. You can execute first
./mvnw spotless:apply -Pcheck -T1C
. Then execute./mvnw checkstyle:check -Pcheck -T1C
to manually adjust to repair the CI.
Got it! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- LGTM. Just waiting for further review by other committers.
|
||
unreservedWord | ||
: AFTER | ALIAS | ALL | ALTER | AND | ANTI | ANY | ARRAY | AS | ASCENDING | ASOF | AST | ASYNC | ATTACH | BETWEEN | BOTH | BY | CASE | ||
| CAST | CHECK | CLEAR | CLUSTER | CODEC | COLLATE | COLUMN | COMMENT | CONSTRAINT | CREATE | CROSS | CUBE | CURRENT | DATABASE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please keep same indent with previous line.
| TABLES | TEMPORARY | TEST | THEN | TIES | TIMEOUT | TIMESTAMP | TOTALS | TRAILING | TRIM | TRUNCATE | TO | TOP | TTL | TYPE | ||
| UNBOUNDED | UNION | UPDATE | USE | USING | UUID | VALUES | VIEW | VOLUME | WATCH | WHEN | WHERE | WINDOW | WITH | ||
; | ||
interval: SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add new line before interval.
grammar BaseRule; | ||
|
||
import LexerSymbol, LexerKeyword, LexerClickHouseKeyword, LexerLiterals; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please only keep one line here.
|
||
delete | ||
: | ||
// DELETE singleTableClause whereClause? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useless sytax.
/** | ||
* Statement visitor facade for ClickHouse. | ||
*/ | ||
public class ClickHouseStatementVisitorFacade implements SQLStatementVisitorFacade { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final for this class.
/** | ||
* ClickHouse DAL statement visitor. | ||
*/ | ||
public class ClickHouseDALStatementVisitor extends ClickHouseStatementVisitor implements DALStatementVisitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final for this class.
/** | ||
* ClickHouse DCL statement visitor. | ||
*/ | ||
public class ClickHouseDCLStatementVisitor extends ClickHouseStatementVisitor implements DCLStatementVisitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final for this class.
/** | ||
* ClickHouse DDL statement visitor. | ||
*/ | ||
public class ClickHouseDDLStatementVisitor extends ClickHouseStatementVisitor implements DDLStatementVisitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final for this class.
/** | ||
* ClickHouse RL statement visitor. | ||
*/ | ||
public class ClickHouseRLStatementVisitor extends ClickHouseStatementVisitor implements RLStatementVisitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final for this class.
/** | ||
* ClickHouse TCL statement visitor. | ||
*/ | ||
public class ClickHouseTCLStatementVisitor extends ClickHouseStatementVisitor implements TCLStatementVisitor { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add final for this class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@strongduanmu All done.
update g4 file to keep format consistent;
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution @zzyReal666
Fixes #31224.
Changes proposed in this pull request:
Before committing this PR, I'm sure that I have checked the following options:
./mvnw clean install -B -T1C -Dmaven.javadoc.skip -Dmaven.jacoco.skip -e
.