added logic to handle semicolon in the query#7861
Conversation
Codecov Report
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
Outdated
Show resolved
Hide resolved
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
Outdated
Show resolved
Hide resolved
pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
Show resolved
Hide resolved
pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
Show resolved
Hide resolved
|
Hi @Manis99803 this may not be the right approach because stripping semicolons in a context insensitive way will break when literals which contain semicolons. |
|
Hi @richardstartin , |
|
Looks good assuming the tests pass 👍🏻 |
Jackie-Jiang
left a comment
There was a problem hiding this comment.
Thanks for the fix and adding the test
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
Outdated
Show resolved
Hide resolved
* added logic to handle semicolon in the query * updated the logic to handle semicolon * removed the comment * updated comments * added trim function to sql * updated the logic of semicolon handling in the sql Co-authored-by: Manish Soni <manisson@cisco.com>
Description
Currently if we have a semicolon in the query, Pinot throws exception. However, semicolon are used in the SQL query to mark the termination of the query, and if a semicolon is present in the Pinot query exception shouldn't be thrown.
This PR implements the fix for the same
Issue Link: #7713