You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2021/03/14 12:04:22 UTC
[GitHub] [arrow] Crystrix opened a new pull request #9700: ARROW-11960: [Gandiva][C++]Support escape in LIKE
Crystrix opened a new pull request #9700:
URL: https://github.com/apache/arrow/pull/9700
Add gdv_fn_like_utf8_utf8_int8 function in Gandiva to support escape char in LIKE. An escape char is stored in an int8 type which is compatible with char type in C++.
----------------------------------------------------------------
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
[GitHub] [arrow] Crystrix commented on pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
Crystrix commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-853679310
Hi @projjal, I've rebased this PR with the master branch. The CI failures seem to be unrelated. Do you know who can be involved to merge 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
[GitHub] [arrow] projjal commented on pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
projjal commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-854383504
@emkornfield Can you merge 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
[GitHub] [arrow] kou closed pull request #9700: ARROW-11960: [C++][Gandiva] Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
kou closed pull request #9700:
URL: https://github.com/apache/arrow/pull/9700
--
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
[GitHub] [arrow] projjal commented on a change in pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
projjal commented on a change in pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#discussion_r603230242
##########
File path: cpp/src/gandiva/function_registry_string.cc
##########
@@ -100,6 +100,10 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
kResultNullIfNull, "gdv_fn_like_utf8_utf8",
NativeFunction::kNeedsFunctionHolder),
+ NativeFunction("like", {}, DataTypeVector{utf8(), utf8(), int8()}, boolean(),
Review comment:
why not provide utf8 instead of int8? or it won't work with multibyte utf8 character.
--
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
[GitHub] [arrow] projjal commented on a change in pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
projjal commented on a change in pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#discussion_r604550069
##########
File path: cpp/src/gandiva/function_registry_string.cc
##########
@@ -100,6 +100,10 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
kResultNullIfNull, "gdv_fn_like_utf8_utf8",
NativeFunction::kNeedsFunctionHolder),
+ NativeFunction("like", {}, DataTypeVector{utf8(), utf8(), int8()}, boolean(),
Review comment:
Sure creating a different ticket to support escaping multibyte char seems fine. I still think you should provide utf8 in the signature instead of int8 and add a check that it is of length 1, since the argument is string type. Or else it won't work when you call the function from java
--
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
[GitHub] [arrow] kou commented on pull request #9700: ARROW-11960: [C++][Gandiva] Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
kou commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-854389259
I'll do.
--
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
[GitHub] [arrow] Crystrix commented on pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
Crystrix commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-853679310
Hi @projjal, I've rebased this PR with the master branch. The CI failures seem to be unrelated. Do you know who can be involved to merge 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
[GitHub] [arrow] Crystrix commented on a change in pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
Crystrix commented on a change in pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#discussion_r604547954
##########
File path: cpp/src/gandiva/function_registry_string.cc
##########
@@ -100,6 +100,10 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
kResultNullIfNull, "gdv_fn_like_utf8_utf8",
NativeFunction::kNeedsFunctionHolder),
+ NativeFunction("like", {}, DataTypeVector{utf8(), utf8(), int8()}, boolean(),
Review comment:
Int8 is used here because function [SqlLikePatternToPcre](https://github.com/apache/arrow/blob/master/cpp/src/gandiva/regex_util.h#L33) only supports a single-byte ASCII char as the escape character.
The change of multibyte escape character may not trivial. Maybe we can create a new issue and another PR to implement it?
--
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
[GitHub] [arrow] kou closed pull request #9700: ARROW-11960: [C++][Gandiva] Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
kou closed pull request #9700:
URL: https://github.com/apache/arrow/pull/9700
--
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
[GitHub] [arrow] projjal commented on pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
projjal commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-854383504
@emkornfield Can you merge 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
[GitHub] [arrow] kou commented on pull request #9700: ARROW-11960: [C++][Gandiva] Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
kou commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-854389259
I'll do.
--
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
[GitHub] [arrow] github-actions[bot] commented on pull request #9700: ARROW-11960: [Gandiva][C++]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#issuecomment-798895560
https://issues.apache.org/jira/browse/ARROW-11960
----------------------------------------------------------------
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
[GitHub] [arrow] Crystrix commented on a change in pull request #9700: ARROW-11960: [C++][Gandiva]Support escape in LIKE
Posted by GitBox <gi...@apache.org>.
Crystrix commented on a change in pull request #9700:
URL: https://github.com/apache/arrow/pull/9700#discussion_r606104266
##########
File path: cpp/src/gandiva/function_registry_string.cc
##########
@@ -100,6 +100,10 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
kResultNullIfNull, "gdv_fn_like_utf8_utf8",
NativeFunction::kNeedsFunctionHolder),
+ NativeFunction("like", {}, DataTypeVector{utf8(), utf8(), int8()}, boolean(),
Review comment:
The code is updated and the int8 type is replaced with utf8 type.
--
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