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():
48
48
assert result
49
49
assert result [0 ].num_columns == 1
50
50
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.
51
54
aggregates = pa .concat_arrays ([batch .column (0 ) for batch in result ])
52
55
53
56
assert len (aggregates ) == 2
@@ -57,11 +60,14 @@ def test_ffi_aggregate_register():
57
60
def test_ffi_aggregate_call_directly ():
58
61
ctx = setup_context_with_table ()
59
62
my_udaf = udaf (MySumUDF ())
60
-
63
+
61
64
result = (
62
65
ctx .table ("test_table" ).aggregate ([col ("b" )], [my_udaf (col ("a" ))]).collect ()
63
66
)
64
67
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.
65
71
assert result
66
72
assert result [0 ].num_columns == 2
67
73
You can’t perform that action at this time.
0 commit comments