You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/02/09 03:53:36 UTC

[GitHub] [incubator-doris] blackfox1983 opened a new pull request #2865: support escape characte

blackfox1983 opened a new pull request #2865: support escape characte
URL: https://github.com/apache/incubator-doris/pull/2865
 
 
   #2864 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] blackfox1983 commented on a change in pull request #2865: support escape characte

Posted by GitBox <gi...@apache.org>.
blackfox1983 commented on a change in pull request #2865: support escape characte
URL: https://github.com/apache/incubator-doris/pull/2865#discussion_r376896454
 
 

 ##########
 File path: be/src/exec/es_http_scan_node.cpp
 ##########
 @@ -166,6 +166,11 @@ Status EsHttpScanNode::start_scanners() {
 }
 
 Status EsHttpScanNode::collect_scanners_status() {
+    // NOTE. if open() was called, but set_range() was NOT called for some reason.
 
 Review comment:
   Yes. it's last pr i commited. it was committed failed at that time

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] wuyunfeng commented on a change in pull request #2865: support escape characte

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on a change in pull request #2865: support escape characte
URL: https://github.com/apache/incubator-doris/pull/2865#discussion_r376764423
 
 

 ##########
 File path: be/src/exec/es/es_query_builder.cpp
 ##########
 @@ -110,8 +110,17 @@ void WildCardQueryBuilder::to_json(rapidjson::Document* document, rapidjson::Val
 }
 WildCardQueryBuilder::WildCardQueryBuilder(const ExtLikePredicate& like_predicate) : _field(like_predicate.col.name) {
     _like_value = like_predicate.value.to_string();
-    std::replace(_like_value.begin(), _like_value.end(), '_', '?');
-    std::replace(_like_value.begin(), _like_value.end(), '%', '*');
+    // example of translation :
+    //      abc\_123 ===> abc?123
 
 Review comment:
   How about abc_123 ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] wuyunfeng commented on a change in pull request #2865: support escape characte

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on a change in pull request #2865: support escape characte
URL: https://github.com/apache/incubator-doris/pull/2865#discussion_r376764478
 
 

 ##########
 File path: be/src/exec/es_http_scan_node.cpp
 ##########
 @@ -166,6 +166,11 @@ Status EsHttpScanNode::start_scanners() {
 }
 
 Status EsHttpScanNode::collect_scanners_status() {
+    // NOTE. if open() was called, but set_range() was NOT called for some reason.
 
 Review comment:
   This comment seems not related with this PR?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] morningman merged pull request #2865: [Doris on ES] Support escape character

Posted by GitBox <gi...@apache.org>.
morningman merged pull request #2865: [Doris on ES] Support escape character
URL: https://github.com/apache/incubator-doris/pull/2865
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] wuyunfeng commented on a change in pull request #2865: support escape characte

Posted by GitBox <gi...@apache.org>.
wuyunfeng commented on a change in pull request #2865: support escape characte
URL: https://github.com/apache/incubator-doris/pull/2865#discussion_r378071540
 
 

 ##########
 File path: be/src/exec/es/es_query_builder.cpp
 ##########
 @@ -110,8 +110,19 @@ void WildCardQueryBuilder::to_json(rapidjson::Document* document, rapidjson::Val
 }
 WildCardQueryBuilder::WildCardQueryBuilder(const ExtLikePredicate& like_predicate) : _field(like_predicate.col.name) {
     _like_value = like_predicate.value.to_string();
-    std::replace(_like_value.begin(), _like_value.end(), '_', '?');
-    std::replace(_like_value.begin(), _like_value.end(), '%', '*');
+    // example of translation :
+    //      abc_123  ===> abc?123
+    //      abc%ykz  ===> abc*123
+    //      abc\\_123 ===> abc\\_123
+    //      abc\\%123 ===> abc\\%123
+    // NOTE. user must input sql like 'abc\\_123' or 'abc\\%ykz'
+    for (int i = 0; i< _like_value.size(); i++) {
 
 Review comment:
   Can we remove `#include <boost/algorithm/string/replace.hpp>` in this file?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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