mihaibudiu commented on code in PR #4339:
URL: https://github.com/apache/calcite/pull/4339#discussion_r2162052645


##########
core/src/main/java/org/apache/calcite/sql/parser/StringAndPos.java:
##########
@@ -65,6 +101,10 @@ private StringAndPos(String sql, int cursor, @Nullable 
SqlParserPos pos) {
    * </ul>
    */
   public static StringAndPos of(String sql) {
+
+    if (BITXOR_OPERATOR_WHITELISTED_SQLS.contains(sql)) {

Review Comment:
   the right way to do this is to introduce an escape mechanism, similar to 
escaping quotes in strings
   For example, parse ^^ into a ^ in StringAndPos.
   If you do that, please add test cases for the StringAndPos parser.
   



##########
core/src/main/java/org/apache/calcite/sql/parser/StringAndPos.java:
##########
@@ -28,6 +31,39 @@ public class StringAndPos {
   public final String sql;
   public final int cursor;
   public final @Nullable SqlParserPos pos;
+  private static final Set<String> BITXOR_OPERATOR_WHITELISTED_SQLS;
+
+  static {

Review Comment:
   are these test cases?
   they do not belong to this class; they should in a test package



-- 
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]

Reply via email to