-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Refactor KsqlParser #1775
Refactor KsqlParser #1775
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.
LGTM
final Pair<String, PlanNode> statementPlanPair = logicalPlans.get(i); | ||
if (statementPlanPair.getRight() == null) { | ||
final Statement statement = statementList.get(i).getRight(); | ||
final LogicalPlanNode statementPlanPair = logicalPlans.get(i); |
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.
nit: maybe a better name for the variable?
Lgtm |
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
Description
While investigating how the parser worked and the different steps used to parse statements and build the AST I noticed that the code was in need of a refactor. So this PR does just that. Main class to change is
KsqlParser
. I've tried to remove duplication from clients ofKsqlParser
and improve encapsulation, (so, for example, the struct re-write is only done in one place now).When reviewing, I'd first look at
KsqlParser
.Testing done
Ran tests.
Reviewer checklist