You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "pitrou (via GitHub)" <gi...@apache.org> on 2023/09/05 09:07:51 UTC

[GitHub] [arrow] pitrou commented on a diff in pull request #37531: GH-37056: [Java] Fix importing an empty data array from c-data

pitrou commented on code in PR #37531:
URL: https://github.com/apache/arrow/pull/37531#discussion_r1315606923


##########
java/c/src/test/python/integration_tests.py:
##########
@@ -195,7 +196,18 @@ def test_list_array(self):
             # disabled check_metadata since the list internal field name ("item")
             # is not preserved during round trips (it becomes "$data$").
         ), check_metadata=False)
-        
+
+    def test_empty_list_array(self):
+        with pa.BufferOutputStream() as bos:
+            schema = pa.schema([pa.field("f0", pa.list_(pa.int32()), True)])
+            with ipc.new_stream(bos, schema) as writer:
+                src = pa.RecordBatch.from_arrays([pa.array([[]])], schema=schema)
+                writer.write(src)
+        with pa.input_stream(bos.getvalue()) as ios:
+            with ipc.open_stream(ios) as reader:
+                batch = reader.read_next_batch()
+
+        self.round_trip_record_batch(lambda: batch)

Review Comment:
   I think this is ok indeed.



-- 
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