Skip to content

Conversation

vladborovtsov
Copy link

@vladborovtsov vladborovtsov commented Sep 27, 2025

Rationale for this change

Add an optional default_column_type parameter to the CSV reading API (C++ and Python) to provide a fallback type when per-column types aren’t specified, improving schema consistency and complementing the existing column_types logic.

What changes are included in this PR?

Are these changes tested?

Yes. Existing and new tests are passing.

C++:

> [==========] Running 3 tests from 1 test suite.
> [----------] Global test environment set-up.
> [----------] 3 tests from ReaderTests
> [ RUN      ] ReaderTests.DefaultColumnTypePartialDefault
> [       OK ] ReaderTests.DefaultColumnTypePartialDefault (3 ms)
> [ RUN      ] ReaderTests.DefaultColumnTypeAllStringsWithHeader
> [       OK ] ReaderTests.DefaultColumnTypeAllStringsWithHeader (0 ms)
> [ RUN      ] ReaderTests.DefaultColumnTypeAllStringsNoHeader
> [       OK ] ReaderTests.DefaultColumnTypeAllStringsNoHeader (0 ms)
> [----------] 3 tests from ReaderTests (4 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 3 tests from 1 test suite ran. (4 ms total)
> [  PASSED  ] 3 tests.

All:

> [==========] 264 tests from 46 test suites ran. (452 ms total)
> [  PASSED  ] 264 tests.

pyarrow:
New tests are passing.

Are there any user-facing changes?

I believe this change is backward compatible. Parameter is optional and its default value doesn't change the existing behavior; All the existing rests are passing.

Maybe relevant: #22232

Relates to #47502

Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

1 similar comment
Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

@vladborovtsov
Copy link
Author

@github-actions crossbow submit preview-docs

Copy link

Only contributors can submit requests to this bot. Please ask someone from the community for help with getting the first commit in.
The Archery job run can be found at: https://github.com/apache/arrow/actions/runs/18062577036

Copy link

⚠️ GitHub issue #47502 has been automatically assigned in GitHub to PR creator.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant