You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "Spenserrrr (via GitHub)" <gi...@apache.org> on 2026/08/31 18:34:25 UTC

[PR] [SPARK-59133][PYTHON][TESTS] Add tests for pa.Table.from_pandas [spark]

Spenserrrr opened a new pull request, #58433:
URL: https://github.com/apache/spark/pull/58433

   ### What changes were proposed in this pull request?
   
   Adds `PyArrowTableFromPandasTests` to `test_pyarrow_dataframe_from_pandas.py`, covering `pa.Table.from_pandas` across `preserve_index` and pinning each column's chunk count. This completes the DataFrame-input `from_pandas` constructors alongside the existing RecordBatch and Schema tests.
   
   ### Why are the changes needed?
   
   `Table.from_pandas` is the only one of the three that accepts a chunked-backed pandas column, because a Table column is a `ChunkedArray` -- `RecordBatch.from_pandas` rejects the same input with `TypeError: Cannot convert ChunkedArray to Array`. Neither that difference nor the chunk counts a Table preserves was pinned anywhere.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No. Test-only.
   
   ### How was this patch tested?
   
   New golden-file test `PyArrowTableFromPandasTests.test_from_pandas`, verified across pyarrow 18-25 x pandas 2/3 with no version overrides needed.
   
   ### Was this patch authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Opus 5)
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59133][PYTHON][TESTS] Add tests for pa.Table.from_pandas [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on PR #58433:
URL: https://github.com/apache/spark/pull/58433#issuecomment-5488575335

   **Merge Summary:**
   - merged into master https://github.com/apache/spark/commit/bf9848d231a07220fe7af669ab4083cd186b6fb9
   - merged into branch-4.x https://github.com/apache/spark/commit/14b29004861b799d5db9e536fdcd82a4d6c43f99
   
   *Posted by `merge_spark_pr.py`*


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59133][PYTHON][TESTS] Add tests for pa.Table.from_pandas [spark]

Posted by "Spenserrrr (via GitHub)" <gi...@apache.org>.
Spenserrrr commented on PR #58433:
URL: https://github.com/apache/spark/pull/58433#issuecomment-5483039522

   Hi @zhengruifeng @Yicong-Huang! This is a PR adding test fro pa.Table.from_pandas. Could you take a look when you have time? Thanks!


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Re: [PR] [SPARK-59133][PYTHON][TESTS] Add tests for pa.Table.from_pandas [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng closed pull request #58433: [SPARK-59133][PYTHON][TESTS] Add tests for pa.Table.from_pandas
URL: https://github.com/apache/spark/pull/58433


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org