Skip to content

Commit

Permalink
fix: remove regex from migration tool (#9254)
Browse files Browse the repository at this point in the history
* remove regex

* checkstyle fixes

* add SET/UNSET to ksql-parser

* ApplyMigrationTest modification

* remove prepare() method/use StatementContext

* more fundemental changes on CommandParser

* change tests (CommandParserTest, ApplyMigrationCommandTest)
  • Loading branch information
aliehsaeedii committed Jul 14, 2022
1 parent d679a4a commit 5089065
Show file tree
Hide file tree
Showing 6 changed files with 625 additions and 1,090 deletions.
Expand Up @@ -665,4 +665,4 @@ WS
// when splitting statements with DelimiterLexer
UNRECOGNIZED
: .
;
;
Expand Up @@ -158,6 +158,19 @@ public Void visitVariableIdentifier(final SqlBaseParser.VariableIdentifierContex
return null;
}

@Override
public Void visitSetProperty(final SqlBaseParser.SetPropertyContext context) {
lookupVariables(context.STRING(0).getText());
lookupVariables(context.STRING(1).getText());
return null;
}

@Override
public Void visitUnsetProperty(final SqlBaseParser.UnsetPropertyContext context) {
lookupVariables(context.STRING().getText());
return null;
}

private String getIdentifierText(final String value) {
final char firstChar = value.charAt(0);
final char lastChar = value.charAt(value.length() - 1);
Expand Down

0 comments on commit 5089065

Please sign in to comment.