pitrou commented on a change in pull request #10883:
URL: https://github.com/apache/arrow/pull/10883#discussion_r750270015
##########
File path: cpp/src/jni/dataset/jni_util.cc
##########
@@ -17,10 +17,15 @@
#include "jni/dataset/jni_util.h"
-#include "arrow/util/logging.h"
-
+#include <memory>
#include <mutex>
+#include "arrow/array/builder_primitive.h"
+#include "arrow/c/bridge.h"
+#include "arrow/c/helpers.h"
+#include "arrow/util/logging.h"
+#include "arrow/util/small_vector.h"
Review comment:
Neither this one.
##########
File path: cpp/src/jni/dataset/jni_util.cc
##########
@@ -237,6 +251,20 @@ arrow::Result<std::shared_ptr<arrow::Schema>>
FromSchemaByteArray(
return schema;
}
+arrow::Status ExportRecordBatch(JNIEnv* env, const
std::shared_ptr<RecordBatch>& batch,
+ jlong struct_array) {
+ RETURN_NOT_OK(arrow::ExportRecordBatch(
+ *batch, reinterpret_cast<struct ArrowArray*>(struct_array)));
+ return Status::OK();
Review comment:
For the record, you can simply write:
```c++
return arrow::ExportRecordBatch(*batch, reinterpret_cast<struct
ArrowArray*>(struct_array));
```
##########
File path: cpp/src/jni/dataset/jni_util.cc
##########
@@ -17,10 +17,15 @@
#include "jni/dataset/jni_util.h"
-#include "arrow/util/logging.h"
-
+#include <memory>
#include <mutex>
+#include "arrow/array/builder_primitive.h"
Review comment:
This include doesn't seem used below.
--
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]