File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
examples/datafusion-ffi-example/python/tests Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,9 @@ def test_ffi_aggregate_register():
4848 assert result
4949 assert result [0 ].num_columns == 1
5050
51+ # Normalizing table registration in _normalize_table_provider feeds the Rust layer
52+ # an actual TableProvider, so collect() emits the grouped rows in a single record batch
53+ # instead of two separate batches.
5154 aggregates = pa .concat_arrays ([batch .column (0 ) for batch in result ])
5255
5356 assert len (aggregates ) == 2
@@ -57,11 +60,14 @@ def test_ffi_aggregate_register():
5760def test_ffi_aggregate_call_directly ():
5861 ctx = setup_context_with_table ()
5962 my_udaf = udaf (MySumUDF ())
60-
63+
6164 result = (
6265 ctx .table ("test_table" ).aggregate ([col ("b" )], [my_udaf (col ("a" ))]).collect ()
6366 )
6467
68+ # Normalizing table registration in _normalize_table_provider feeds the Rust layer
69+ # an actual TableProvider, so collect() emits the grouped rows in a single record batch
70+ # instead of two separate batches.
6571 assert result
6672 assert result [0 ].num_columns == 2
6773
You can’t perform that action at this time.
0 commit comments