Repository navigation
Conversation
DataFusion 56 made the global Parquet compression, statistics_enabled and encoding options enums, and apache#1826 parsed them in the ParquetWriterOptions constructor with py_datafusion_err. An invalid value therefore raised RuntimeError with the Rust Debug string, for example Configuration("Unknown or unsupported parquet compression: ..."), while SessionConfig.set raised ValueError with a readable message for the same setting. Map all four parse errors, including writer_version, with from_datafusion_error so they raise ValueError, as the comment on SessionConfig.set asks for rejected values. Tighten the existing tests from Exception to ValueError and cover statistics_enabled, which on 55 was silently replaced with "page". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Settings that DataFusion 56 validates when they are set go beyond the time zone. The Parquet compression, statistics_enabled and encoding options and coerce_int96_tz are also rejected with ValueError by SQL SET and SessionConfig.set, where 55 accepted them. Add that to the upgrade guide along with the ParquetWriterOptions change, and pin the ValueError with a test. When null_regex is set, empty fields and the missing fields of truncated rows are no longer null unless the pattern matches the empty string. In a column that is not a string they now fail to parse. Say so in the upgrade guide and in the CsvReadOptions docstring, which promised nulls for truncated rows. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SessionContext.sql runs DDL right away, so its logical plan is an empty relation and the DDL node never reaches to_variant(). EXPLAIN plans the statement without running it, which makes CreateExternalCatalog and DropCatalog testable after all. Use it for both, check their accessors, and revive the drop_catalog_schema test, which lacked the test_ prefix and never ran. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
No issue. Follow-up to the review of #1826.
Rationale for this change
#1826 upgraded to DataFusion 56. Comparing it with the 55.0.0 release turned up a few gaps that users would hit.
compression,statistics_enabledorencodinginParquetWriterOptionsraisedRuntimeErrorwith a RustDebugstring, for exampleConfiguration("Unknown or unsupported parquet compression: bogus. ...").SessionConfig.setrejects the same values with a readableValueError.compression,statistics_enabled,encodingandcoerce_int96_tzsettings are now rejected when they are set, and an invalidstatistics_enabledinParquetWriterOptionsis no longer silently replaced with"page".null_regexset, an empty field in a column that is not a string now fails to parse, and the missing fields of truncated rows are read the same way as empty fields. Neither the guide nor theCsvReadOptionsdocstring said so. Thetruncated_rowsdocstring still promised nulls.CreateExternalCatalogandDropCataloghad no tests, becauseSessionContext.sqlruns DDL right away and the DDL node never reachesto_variant().What changes are included in this PR?
ParquetWriterOptionsmaps the parse errors forwriter_version,compression,statistics_enabledandencodingwithfrom_datafusion_error, so they raiseValueError. Column-specific options are still plain strings upstream and are checked when the file is written, so they are unchanged.coerce_int96_tz, and the CSVnull_regexsection covers non-string columns and truncated rows. Thenull_regexandtruncated_rowsdocstrings match.ParquetWriterOptionserror tests now expectValueError, andtest_write_parquet_with_options_invalid_statistics_enabledis new. These fail without the fix.test_set_rejects_an_invalid_valuepins theValueErrorfrom SQLSETandSessionConfig.setthat the guide describes.test_drop_catalog,test_create_external_catalogandtest_drop_catalog_schemaplan the statement underEXPLAIN, which does not run it, and check the node's accessors.test_drop_catalog_schemareplaces a test that was missing itstest_prefix and never ran.python/tests/test_dataframe.pyis skipped in CI at the moment, becausepyarrow.cfficannot be imported there, so the Parquet tests in this PR were run locally.Are there any user-facing changes?
Yes. An invalid
writer_version,compression,statistics_enabledorencodinginParquetWriterOptionsnow raisesValueErrorfromwrite_parquet_with_options. On 55.0.0,writer_versionraisedRuntimeError,compressionandencodingraisedExceptionwhile writing, and an invalidstatistics_enabledwas ignored. Code that catchesExceptionis unaffected. The upgrade guide covers this, along with the other DataFusion 56 changes above.