Skip to content

Comments

TEST: Add truncated_rows parameter#1

Closed
djouallah wants to merge 4 commits intomainfrom
feat/add-truncated-rows-csv-parameter
Closed

TEST: Add truncated_rows parameter#1
djouallah wants to merge 4 commits intomainfrom
feat/add-truncated-rows-csv-parameter

Conversation

@djouallah
Copy link
Owner

Draft PR to test CI before submitting upstream

djouallah and others added 4 commits January 31, 2026 10:49
Exposes the truncated_rows parameter from Rust DataFusion to Python bindings.
This enables reading CSV files with inconsistent column counts by creating a
union schema and filling missing columns with nulls.

The parameter was added to DataFusion Rust in PR apache/datafusion#17553
and is now available in datafusion 51.0.0.

Changes:
- Add truncated_rows parameter to SessionContext.register_csv()
- Add truncated_rows parameter to SessionContext.read_csv()
- Add comprehensive tests for both methods
- Update docstrings with parameter documentation

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
The tests now only verify that the truncated_rows parameter is accepted
by the Python bindings, not the actual behavior. Behavior testing is an
upstream DataFusion concern (apache/datafusion#17553).

This follows the principle that Python bindings should expose all Rust
API parameters regardless of upstream implementation status.
@djouallah djouallah closed this Jan 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant