Aravind-Suresh commented on code in PR #10897:
URL: https://github.com/apache/pinot/pull/10897#discussion_r1228971334
##########
pinot-common/src/main/java/org/apache/pinot/common/utils/RegexpPatternConverterUtils.java:
##########
@@ -18,16 +18,23 @@
*/
package org.apache.pinot.common.utils;
+import com.google.common.collect.ImmutableSet;
+import java.util.Set;
+
/**
* Utility for converting regex patterns.
*/
public class RegexpPatternConverterUtils {
private RegexpPatternConverterUtils() {
}
- /* Represents all metacharacters to be processed */
- public static final String[] REGEXP_METACHARACTERS =
- {"\\", "^", "$", ".", "{", "}", "[", "]", "(", ")", "*", "+", "?", "|",
"<", ">", "-", "&", "/"};
+ /*
+ * Represents all metacharacters to be processed.
+ * This excludes the \ (back slash) character as that doubles up as an
escape character as well.
+ * So it is handled separately in the conversion logic.
+ */
+ public static final Set<String> REGEXP_METACHARACTERS = ImmutableSet.of(
Review Comment:
Ack, will fix this.
--
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]