Skip to content

Samza-2287: Removing RegEx based matching while parsing the sql statement#1121

Merged
srinipunuru merged 3 commits into
apache:masterfrom
srinipunuru:parse.1
Jul 31, 2019
Merged

Samza-2287: Removing RegEx based matching while parsing the sql statement#1121
srinipunuru merged 3 commits into
apache:masterfrom
srinipunuru:parse.1

Conversation

@srinipunuru
Copy link
Copy Markdown
Contributor

SamzaSQLQueryParser uses a brittle regEx parsing to fetch the SQL statement from the SQL. Removing this Regex parsing and use the string generated from SqlSelect node.

@srinipunuru srinipunuru changed the title Removing RegEx while parsing the sql statement Samza-2287: Removing RegEx based matching while parsing the sql statement Jul 31, 2019
@srinipunuru srinipunuru requested a review from atoomula July 31, 2019 20:38
Copy link
Copy Markdown

@gauravrkulkarni gauravrkulkarni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

LOG.info("Parsed select query {} from sql {}", selectQuery, sql);
sources = getSourcesFromSelectQuery(sqlSelect);
} else {
throw new SamzaException("Sql query is not of the expected format");
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: not directly related to this PR, but might want to add what the expected format is in the exception message here and below.

Copy link
Copy Markdown
Contributor

@atoomula atoomula left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@srinipunuru srinipunuru merged commit 179d394 into apache:master Jul 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants