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 2022/05/05 13:23:51 UTC

[GitHub] [arrow] Johnnathanalmeida opened a new pull request, #13073: [Gandiva][C++] Add binary functions

Johnnathanalmeida opened a new pull request, #13073:
URL: https://github.com/apache/arrow/pull/13073

   This PR was created to implement binary functions in Gandiva side based on [Hive implementation](https://github.com/apache/hive/blob/master/ql/src/java/org/apache/hadoop/hive/ql/udf/generic/GenericUDFToBinary.java).
   
   This PR implements the follow signatures:
   
   FunctionSignature{name =binary, return type =binary, param types =[string]}
   FunctionSignature{name =binary, return type =binary, param types =[binary]}


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] projjal commented on a diff in pull request #13073: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
projjal commented on code in PR #13073:
URL: https://github.com/apache/arrow/pull/13073#discussion_r870171291


##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -705,6 +705,25 @@ CAST_VARCHAR_FROM_VARLEN_TYPE(binary)
 CAST_VARBINARY_FROM_STRING_AND_BINARY(utf8)
 CAST_VARBINARY_FROM_STRING_AND_BINARY(binary)
 
+#define CAST_BINARY_FROM_STRING_AND_BINARY(TYPE)                                         \
+  GANDIVA_EXPORT                                                                         \
+  const char* castBINARY_##TYPE(gdv_int64 context, const char* data, gdv_int32 data_len, \
+                                int32_t* out_length) {                                   \
+    int32_t len = static_cast<int32_t>(data_len);                                        \
+    if (len < 0) {                                                                       \

Review Comment:
   this check is not required



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] ursabot commented on pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
ursabot commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1137867374

   Benchmark runs are scheduled for baseline = 3b92f0279dd69b1120b1623cf1e98f8b559f7762 and contender = f76615977b46efb2b185b859ce5501e37f227afa. f76615977b46efb2b185b859ce5501e37f227afa is a master commit associated with this PR. Results will be available as each benchmark for each run completes.
   Conbench compare runs links:
   [Finished :arrow_down:0.0% :arrow_up:0.0%] [ec2-t3-xlarge-us-east-2](https://conbench.ursa.dev/compare/runs/d1b262f73c1248cfad60fac9cd69047d...a6671860e3cc491f8ff0ae0af7248d99/)
   [Failed :arrow_down:0.16% :arrow_up:0.08%] [test-mac-arm](https://conbench.ursa.dev/compare/runs/709bd99ed48543ad9388de764b431233...65299a39e0a04b4e89ab20050426bb2a/)
   [Failed :arrow_down:0.37% :arrow_up:0.0%] [ursa-i9-9960x](https://conbench.ursa.dev/compare/runs/b38cbb0a04794f9bbfd59d4b5f150a2d...0ed47bc047a443bc85e984c30bacbefc/)
   [Finished :arrow_down:0.24% :arrow_up:0.2%] [ursa-thinkcentre-m75q](https://conbench.ursa.dev/compare/runs/8e8692cb9133483db591bef9b65d3382...1934ec2d4f9b42bbacf2c319c278135e/)
   Buildkite builds:
   [Finished] [`f7661597` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/822)
   [Failed] [`f7661597` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/821)
   [Failed] [`f7661597` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/811)
   [Finished] [`f7661597` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/825)
   [Finished] [`3b92f027` ec2-t3-xlarge-us-east-2](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ec2-t3-xlarge-us-east-2/builds/821)
   [Failed] [`3b92f027` test-mac-arm](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-test-mac-arm/builds/820)
   [Failed] [`3b92f027` ursa-i9-9960x](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-i9-9960x/builds/810)
   [Finished] [`3b92f027` ursa-thinkcentre-m75q](https://buildkite.com/apache-arrow/arrow-bci-benchmark-on-ursa-thinkcentre-m75q/builds/824)
   Supported benchmarks:
   ec2-t3-xlarge-us-east-2: Supported benchmark langs: Python, R. Runs only benchmarks with cloud = True
   test-mac-arm: Supported benchmark langs: C++, Python, R
   ursa-i9-9960x: Supported benchmark langs: Python, R, JavaScript
   ursa-thinkcentre-m75q: Supported benchmark langs: C++, 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.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Johnnathanalmeida commented on a diff in pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
Johnnathanalmeida commented on code in PR #13073:
URL: https://github.com/apache/arrow/pull/13073#discussion_r870327545


##########
cpp/src/gandiva/function_registry_string.cc:
##########
@@ -439,6 +439,14 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
                      kResultNullIfNull, "right_utf8_int32",
                      NativeFunction::kNeedsContext),
 
+      NativeFunction("binary", {}, DataTypeVector{binary()}, binary(), kResultNullIfNull,
+                     "castBINARY_binary",
+                     NativeFunction::kNeedsContext | NativeFunction::kCanReturnErrors),

Review Comment:
   Ok, these two flags was removed.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Johnnathanalmeida commented on a diff in pull request #13073: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
Johnnathanalmeida commented on code in PR #13073:
URL: https://github.com/apache/arrow/pull/13073#discussion_r870195336


##########
cpp/src/gandiva/precompiled/string_ops.cc:
##########
@@ -705,6 +705,25 @@ CAST_VARCHAR_FROM_VARLEN_TYPE(binary)
 CAST_VARBINARY_FROM_STRING_AND_BINARY(utf8)
 CAST_VARBINARY_FROM_STRING_AND_BINARY(binary)
 
+#define CAST_BINARY_FROM_STRING_AND_BINARY(TYPE)                                         \
+  GANDIVA_EXPORT                                                                         \
+  const char* castBINARY_##TYPE(gdv_int64 context, const char* data, gdv_int32 data_len, \
+                                int32_t* out_length) {                                   \
+    int32_t len = static_cast<int32_t>(data_len);                                        \
+    if (len < 0) {                                                                       \

Review Comment:
   Ok, this if clause was removed.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] pravindra closed pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
pravindra closed pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions
URL: https://github.com/apache/arrow/pull/13073


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Johnnathanalmeida commented on pull request #13073: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
Johnnathanalmeida commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1118920423

   @github-actions crossbow submit java-jars


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13073: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1118546495

   <!--
     Licensed to the Apache Software Foundation (ASF) under one
     or more contributor license agreements.  See the NOTICE file
     distributed with this work for additional information
     regarding copyright ownership.  The ASF licenses this file
     to you under the Apache License, Version 2.0 (the
     "License"); you may not use this file except in compliance
     with the License.  You may obtain a copy of the License at
   
       http://www.apache.org/licenses/LICENSE-2.0
   
     Unless required by applicable law or agreed to in writing,
     software distributed under the License is distributed on an
     "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
     KIND, either express or implied.  See the License for the
     specific language governing permissions and limitations
     under the License.
   -->
   
   Thanks for opening a pull request!
   
   If this is not a [minor PR](https://github.com/apache/arrow/blob/master/CONTRIBUTING.md#Minor-Fixes). Could you open an issue for this pull request on JIRA? https://issues.apache.org/jira/browse/ARROW
   
   Opening JIRAs ahead of time contributes to the [Openness](http://theapacheway.com/open/#:~:text=Openness%20allows%20new%20users%20the,must%20happen%20in%20the%20open.) of the Apache Arrow project.
   
   Then could you also rename pull request title in the following format?
   
       ARROW-${JIRA_ID}: [${COMPONENT}] ${SUMMARY}
   
   or
   
       MINOR: [${COMPONENT}] ${SUMMARY}
   
   See also:
   
     * [Other pull requests](https://github.com/apache/arrow/pulls/)
     * [Contribution Guidelines - How to contribute patches](https://arrow.apache.org/docs/developers/contributing.html#how-to-contribute-patches)
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] projjal commented on a diff in pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
projjal commented on code in PR #13073:
URL: https://github.com/apache/arrow/pull/13073#discussion_r870212747


##########
cpp/src/gandiva/function_registry_string.cc:
##########
@@ -439,6 +439,14 @@ std::vector<NativeFunction> GetStringFunctionRegistry() {
                      kResultNullIfNull, "right_utf8_int32",
                      NativeFunction::kNeedsContext),
 
+      NativeFunction("binary", {}, DataTypeVector{binary()}, binary(), kResultNullIfNull,
+                     "castBINARY_binary",
+                     NativeFunction::kNeedsContext | NativeFunction::kCanReturnErrors),

Review Comment:
   It doesn't requried context and canreturnerrors flags.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1123647366

   :warning: Ticket **has not been started in JIRA**, please click 'Start Progress'.


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] Johnnathanalmeida commented on pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
Johnnathanalmeida commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1124922865

   @github-actions crossbow submit java-jars


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13073: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1118921471

   Revision: 7dbbda569f6e40c8f7df0d773ca5945ee96fb442
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-2019](https://github.com/ursacomputing/crossbow/branches/all?query=actions-2019)
   
   |Task|Status|
   |----|------|
   |java-jars|[![Github Actions](https://github.com/ursacomputing/crossbow/workflows/Crossbow/badge.svg?branch=actions-2019-github-java-jars)](https://github.com/ursacomputing/crossbow/actions?query=branch:actions-2019-github-java-jars)|


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1123647346

   https://issues.apache.org/jira/browse/ARROW-16527


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [arrow] github-actions[bot] commented on pull request #13073: ARROW-16527: [Gandiva][C++] Add binary functions

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on PR #13073:
URL: https://github.com/apache/arrow/pull/13073#issuecomment-1124924176

   Revision: 600cff15d67df015c8508867a9e65ee6772201cf
   
   Submitted crossbow builds: [ursacomputing/crossbow @ actions-2076](https://github.com/ursacomputing/crossbow/branches/all?query=actions-2076)
   
   |Task|Status|
   |----|------|
   |java-jars|[![Github Actions](https://github.com/ursacomputing/crossbow/workflows/Crossbow/badge.svg?branch=actions-2076-github-java-jars)](https://github.com/ursacomputing/crossbow/actions?query=branch:actions-2076-github-java-jars)|


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org