You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2020/11/11 19:07:51 UTC

[incubator-pinot] 01/01: Replace sql literal regex replace

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch fixing_sql_literal_regex
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git

commit 9d0376cde38b46c4e8412f2bf142982b5ba31483
Author: Xiang Fu <fx...@gmail.com>
AuthorDate: Wed Nov 11 11:06:12 2020 -0800

    Replace sql literal regex replace
---
 .../main/java/org/apache/pinot/common/utils/request/RequestUtils.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java b/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
index c7b3904..e542433 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
@@ -112,7 +112,7 @@ public class RequestUtils {
         literal.setDoubleValue(node.bigDecimalValue().doubleValue());
       }
     } else {
-      literal.setStringValue(node.toString().replaceAll("^'|'$", "").replace("''", "'"));
+      literal.setStringValue(node.toValue());
     }
     expression.setLiteral(literal);
     return expression;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org