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:50 UTC

[incubator-pinot] branch fixing_sql_literal_regex created (now 9d0376c)

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

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


      at 9d0376c  Replace sql literal regex replace

This branch includes the following new commits:

     new 9d0376c  Replace sql literal regex replace

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



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


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

Posted by xi...@apache.org.
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