mchades commented on code in PR #8963:
URL: https://github.com/apache/gravitino/pull/8963#discussion_r2476672846
##########
lance/lance-common/src/main/java/org/apache/gravitino/lance/common/ops/gravitino/GravitinoLanceNamespaceWrapper.java:
##########
@@ -646,157 +608,44 @@ public CreateTableResponse createTable(
return response;
}
- private ArrowRecordBatchList parseArrowIpcStream(byte[] stream) {
+ private JsonArrowSchema toJsonArrowSchema(Column[] columns) {
+ List<Field> fields =
+ Arrays.stream(columns)
+ .map(col -> CONVERTER.toArrowField(col.name(), col.dataType(),
col.nullable()))
+ .collect(Collectors.toList());
+
+ return JsonArrowSchemaConverter.convertToJsonArrowSchema(
+ new org.apache.arrow.vector.types.pojo.Schema(fields));
+ }
+
+ private org.apache.arrow.vector.types.pojo.Schema parseArrowIpcStream(byte[]
stream) {
+ org.apache.arrow.vector.types.pojo.Schema schema;
+
try (BufferAllocator allocator = new RootAllocator();
ByteArrayInputStream bais = new ByteArrayInputStream(stream);
ArrowStreamReader reader = new ArrowStreamReader(bais, allocator)) {
-
- org.apache.arrow.vector.types.pojo.Schema schema =
reader.getVectorSchemaRoot().getSchema();
- List<VectorSchemaRoot> batches = new ArrayList<>();
-
- while (reader.loadNextBatch()) {
- VectorSchemaRoot root = reader.getVectorSchemaRoot();
Review Comment:
I haven't seen it used elsewhere.
--
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]