davisusanibar commented on code in PR #35570:
URL: https://github.com/apache/arrow/pull/35570#discussion_r1218750347
##########
java/dataset/src/main/java/org/apache/arrow/dataset/jni/NativeDataset.java:
##########
@@ -36,12 +36,14 @@ public NativeDataset(NativeContext context, long datasetId)
{
}
@Override
+ @SuppressWarnings("ArrayToString")
Review Comment:
Deleted
##########
java/dataset/src/main/cpp/jni_wrapper.cc:
##########
@@ -696,3 +722,44 @@ JNIEXPORT void JNICALL
JniAssertOkOrThrow(arrow::ExportRecordBatchReader(reader_out,
arrow_stream_out));
JNI_METHOD_END()
}
+
+/*
+ * Class: org_apache_arrow_dataset_substrait_JniWrapper
+ * Method: executeDeserializeExpressions
+ * Signature: (Ljava/nio/ByteBuffer;)[Ljava/lang/String;
+ */
+JNIEXPORT jobjectArray JNICALL
+
Java_org_apache_arrow_dataset_substrait_JniWrapper_executeDeserializeExpressions
(
+ JNIEnv* env, jobject, jobject expression) {
+ JNI_METHOD_START
+ auto *buff =
reinterpret_cast<jbyte*>(env->GetDirectBufferAddress(expression));
+ int length = env->GetDirectBufferCapacity(expression);
+ std::shared_ptr<arrow::Buffer> buffer =
JniGetOrThrow(arrow::AllocateBuffer(length));
+ std::memcpy(buffer->mutable_data(), buff, length);
+ // execute expression
+ arrow::engine::BoundExpressions round_tripped =
Review Comment:
Deleted
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]