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/11 11:09:30 UTC

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

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