Jackie-Jiang commented on code in PR #8905:
URL: https://github.com/apache/pinot/pull/8905#discussion_r899382658
##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java:
##########
@@ -81,13 +81,10 @@ private CalciteSqlParser() {
// PQL syntax is: `OPTION (<key> = <value>)`
//
// Multiple OPTIONs is also supported by:
- // either
- // `OPTION (<k1> = <v1>, <k2> = <v2>, <k3> = <v3>)`
- // or
- // `OPTION (<k1> = <v1>) OPTION (<k2> = <v2>) OPTION (<k3> = <v3>)`
- // TODO: move to use parser syntax extension: `OPTION` `(` `<key>` =
`<value>` [, `<key>` = `<value>`]* `)`
+ // `OPTION (<k1> = <v1>, <k2> = <v2>, <k3> = <v3>)`
+ @Deprecated
private static final Pattern OPTIONS_REGEX_PATTEN =
- Pattern.compile("option\\s*\\(([^\\)]+)\\)", Pattern.CASE_INSENSITIVE);
+ Pattern.compile("option\\s*\\(([^\\)]+)\\)\\Z",
Pattern.CASE_INSENSITIVE);
Review Comment:
We should force whitespace before option and allow whitespace after it but
before the end of string: `\\s+option\\s*\\(([^\\)]+)\\)\\s*\\z`
##########
pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java:
##########
@@ -81,13 +81,10 @@ private CalciteSqlParser() {
// PQL syntax is: `OPTION (<key> = <value>)`
//
// Multiple OPTIONs is also supported by:
- // either
- // `OPTION (<k1> = <v1>, <k2> = <v2>, <k3> = <v3>)`
- // or
- // `OPTION (<k1> = <v1>) OPTION (<k2> = <v2>) OPTION (<k3> = <v3>)`
- // TODO: move to use parser syntax extension: `OPTION` `(` `<key>` =
`<value>` [, `<key>` = `<value>`]* `)`
+ // `OPTION (<k1> = <v1>, <k2> = <v2>, <k3> = <v3>)`
+ @Deprecated
Review Comment:
Let's not deprecate it now. We can deprecate this after adding the `SET`
support
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]