Repository navigation
Remove old Parquet writer and reader implementations - #100949
Conversation
Remove the old Arrow-based Parquet writer (used when `output_format_parquet_use_custom_encoder` = 0) and the old Arrow-based Parquet reader (used when `input_format_parquet_use_native_reader_v3` = 0). Both newer implementations have been the default for an extended period and perform reliably. The custom encoder has been default since 24.5, and the native reader v3 since 25.11. Changes: - Mark `output_format_parquet_use_custom_encoder` and `input_format_parquet_use_native_reader_v3` as obsolete settings - Remove the `writeUsingArrow` code path and Arrow library dependencies from `ParquetBlockOutputFormat` - Remove the entire `ParquetBlockInputFormat` class (old Arrow-based reader) and `ArrowParquetSchemaReader` - Simplify format registration to always use `ParquetV3BlockInputFormat` and `NativeParquetSchemaReader` - PREWHERE support checker for Parquet now always returns true - Update ~50 test files to remove references to obsolete settings - Update documentation Closes #100126 Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
Workflow [PR], commit [d4837b6] Summary: ✅ AI ReviewSummaryThis PR removes the legacy Arrow-based Parquet reader/writer paths and keeps only the native ClickHouse Rules
Final Verdict
|
Fix style check: remove unused `ErrorCodes::LOGICAL_ERROR` from `ParquetBlockInputFormat.cpp` and unused `ErrorCodes::UNKNOWN_EXCEPTION`, `ErrorCodes::NOT_IMPLEMENTED` from `ParquetBlockOutputFormat.cpp`. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…iant_nested_types` as obsolete These settings were only used by the old Arrow-based Parquet writer. The custom encoder always writes Parquet V2.6+ and always uses compliant nested types, so these settings have had no effect since the custom encoder became the default in version 24.5. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
- `02245_parquet_skip_unknown_type`: Add `error_message` column to reference — the v3 native reader supports the always-null type and includes it instead of skipping. - `03164_adapting_parquet_reader_output_size`: Reduce row count from 25000 to 10000 to fix timeout in flaky check (>180s limit). Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
The removal of the NOTE about `output_format_parquet_use_custom_encoder` left two consecutive blank lines, which violates the markdown linter rule MD012. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
| }); | ||
| addSettingsChanges(settings_changes_history, "26.1", | ||
| { | ||
| {"output_format_parquet_use_custom_encoder", true, true, "Obsolete setting, the custom encoder is now always used."}, |
There was a problem hiding this comment.
This change is recorded under 26.1, but the behavior change is introduced by this PR now.
Placing it in an older version makes system.settings_changes misleading and also means compatibility handling for the actual introduction version is tracked under the wrong release bucket.
Please move these four entries to the current release block (the newest addSettingsChanges(...) section used for this development cycle), keeping the same messages.
…ngsChangesHistory` Move the four obsolete Parquet setting entries (`output_format_parquet_use_custom_encoder`, `output_format_parquet_version`, `output_format_parquet_compliant_nested_types`, `input_format_parquet_use_native_reader_v3`) from the 26.1 block to the 26.4 block, since the behavior change is introduced by this PR, not in a past release. This addresses review feedback about `SettingsChangesHistory` entries being placed under the wrong version. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
al13n321
left a comment
There was a problem hiding this comment.
A bit scary (what if someone's using it, what if we want a reference implementation for testing in future), but hard to argue with -2287 loc :)
| return parquet_column_descriptor; | ||
| } | ||
|
|
||
| void ParquetFileBucketInfo::serialize(WriteBuffer & buffer) |
There was a problem hiding this comment.
Move these remaining bits into ParquetV3BlockInputFormat.{h,cpp} and delete ParquetBlockInputFormat.{h,cpp}.
| $CLICKHOUSE_CLIENT -q "desc file(test_02245.parquet) settings input_format_parquet_use_native_reader_v3=0" 2>&1 | grep -qF "CANNOT_EXTRACT_TABLE_STRUCTURE" && echo "OK" || echo "FAIL" | ||
| $CLICKHOUSE_CLIENT -q "desc file(test_02245.parquet) settings input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference=1, input_format_parquet_use_native_reader_v3=0" | ||
| $CLICKHOUSE_CLIENT -q "select count(*) from file(test_02245.parquet) settings input_format_parquet_skip_columns_with_unsupported_types_in_schema_inference=1, input_format_parquet_use_native_reader_v3=0" | ||
| # The v3 reader supports the always-null type, so desc succeeds. |
There was a problem hiding this comment.
This no longer makes sense, or at least doesn't match the name of the test. Ideally make this test use a type that the reader still doesn't support, or otherwise at least change the test name to be about always-null type.
…tFormat`, delete old files, rename test
- Move `ParquetFileBucketInfo`, `ParquetBucketSplitter`, and format registration
functions from `ParquetBlockInputFormat.{h,cpp}` into `ParquetV3BlockInputFormat.{h,cpp}`
- Delete `ParquetBlockInputFormat.{h,cpp}` entirely
- Update all includes that referenced the old header
- Rename test `02245_parquet_skip_unknown_type` to `02245_parquet_always_null_type`
since the native reader supports the always-null type and no columns are skipped
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
…reader-writer # Conflicts: # src/Storages/ObjectStorage/StorageObjectStorageSource.cpp
Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
|
The flaky check failure is fixed in #102148, let's update the branch. |
…reader-writer # Conflicts: # src/Processors/Formats/Impl/ParquetBlockInputFormat.cpp # src/Processors/Formats/Impl/ParquetBlockOutputFormat.cpp
Master has advanced past 26.4 into the 26.5 development cycle, so move the four obsolete Parquet setting entries (`output_format_parquet_use_custom_encoder`, `output_format_parquet_version`, `output_format_parquet_compliant_nested_types`, `input_format_parquet_use_native_reader_v3`) from the 26.4 block into the current 26.5 block. This keeps `system.settings_changes` and `compatibility` handling aligned with the actual introduction version. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
After merging master, three tests brought in from other PRs still referenced the now-obsolete settings `output_format_parquet_use_custom_encoder` and `input_format_parquet_use_native_reader_v3`. Drop those `SETTINGS` clauses — the custom encoder and V3 reader are always used. - `04099_parquet_nullable_null_check_fix.sh` - `04103_deltalake_parquet_metadata_cache.sql` - `04108_parquet_metadata_cache_persists_across_drop.sql` Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
| MAKE_OBSOLETE(M, Bool, input_format_parquet_use_native_reader_v3, true) \ | ||
| MAKE_OBSOLETE(M, Bool, output_format_parquet_use_custom_encoder, true) \ | ||
| MAKE_OBSOLETE(M, ParquetVersion, output_format_parquet_version, "2.latest") \ | ||
| MAKE_OBSOLETE(M, Bool, output_format_parquet_compliant_nested_types, true) \ |
There was a problem hiding this comment.
output_format_parquet_unsupported_types_as_binary still remains a normal setting, but after removing writeUsingArrow there is no remaining code path that reads this flag. The new writer always throws UNKNOWN_TYPE for unsupported types, so this setting has become silently ineffective.
Please either:
- mark
output_format_parquet_unsupported_types_as_binaryas obsolete inOBSOLETE_FORMAT_SETTINGS(same as other removed Parquet toggles in this PR), or - implement equivalent behavior in the native writer.
Without one of these, users can set the option and get different behavior than the setting name promises.
|
@groeneai, please fix this BuzzHouse finding, send a separate PR, and assign it to @Michicosun, because he was involved in these changes and likely introduced this bug. In the PR, please attract @Michicosun's attention as loudly as possible, so he has a chance to notice. |
The new Parquet writer always throws `UNKNOWN_TYPE` for unsupported types and has no binary-fallback code path, so this setting was silently ineffective after this PR removed `writeUsingArrow`. Mark it obsolete in `OBSOLETE_FORMAT_SETTINGS` (same as the other removed Parquet toggles in this PR), drop the unused `format_settings.parquet.output_unsupported_types_as_binary` field and assignment in `FormatFactory`, and record the change in `SettingsChangesHistory.cpp` under the current `26.5` block. Addresses review feedback on #100949 Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
…reader-writer # Conflicts: # src/Processors/tests/gtest_write_parquet_page_index.cpp
|
@alexey-milovidov — the BuzzHouse finding here ( Cross-PR confirmation that this is a trunk bug, not a #100949 regression: STID 3381-2a5e has hit 9 times across master + 7 unrelated PRs in the last 90 days (different subcolumn names: Root cause: PR #102470 status: rebased on master 2026-04-24, CI green (Style check, Fast test, Code Review all pass; AI Review verdict: Approve), regression test covers I just cc'd @Michicosun on #102470 with a loud notification per your directive — could you take a look so the fix can move forward? Session: cron:clickhouse-ci-task-worker:20260427-151500 |
LLVM Coverage Report
Changed lines: 84.19% (245/291) | lost baseline coverage: 1 line(s) · Uncovered code |
…ease notes The 26.6 Cloud release notes were missing several backward incompatible changes that ship in that version: * UUID parsing now rejects same-length non-hexadecimal strings (ClickHouse#104370). * The obsolete Arrow-based Parquet reader and writer were removed (ClickHouse#100949). * `RANK` and `DENSE_RANK` reject arguments (ClickHouse#104324). * `Dynamic`/`Variant` types are validated in window `PARTITION BY` (ClickHouse#105450).
|
FYI the native implementation uses more memory than the Arrow one for some |
Remove the old Arrow-based Parquet writer (used when
output_format_parquet_use_custom_encoder= 0) and the old Arrow-based Parquet reader (used wheninput_format_parquet_use_native_reader_v3= 0).Both newer implementations have been the default for an extended period and perform reliably. The custom encoder has been default since 24.5, and the native reader v3 since 25.11.
Changes:
output_format_parquet_use_custom_encoderandinput_format_parquet_use_native_reader_v3as obsolete settingswriteUsingArrowcode path and Arrow library dependencies fromParquetBlockOutputFormatParquetBlockInputFormatclass (old Arrow-based reader) andArrowParquetSchemaReaderParquetV3BlockInputFormatandNativeParquetSchemaReaderCloses #100126
Changelog category (leave one):
Changelog entry (a user-readable short description of the changes that goes into CHANGELOG.md):
You can no longer use the obsolete Arrow-based Parquet reader and writer. The native implementation will be used instead.