nuno-faria commented on code in PR #1315:
URL:
https://github.com/apache/datafusion-python/pull/1315#discussion_r2586400668
##########
python/tests/test_dataframe.py:
##########
@@ -1867,6 +1867,18 @@ def test_to_arrow_table(df):
assert set(pyarrow_table.column_names) == {"a", "b", "c"}
+def test_parquet_non_null_column_to_pyarrow(ctx, tmp_path):
+ path = tmp_path.joinpath("t.parquet")
+
+ ctx.sql("create table t_(a int not null)").collect()
+ ctx.sql("insert into t_ values (1), (2), (3)").collect()
+ ctx.sql(f"copy (select * from t_) to '{path}'").collect()
+
+ ctx.register_parquet("t", path)
+ pyarrow_table = ctx.sql("select max(a) as m from t").to_arrow_table()
+ assert pyarrow_table.to_pydict() == {"m": [3]}
+
+
Review Comment:
Good call, I've added those two new tests.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]