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:38:42 UTC

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

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