feat: partition_by option for Hive-partitioned Parquet output#21
Merged
Conversation
Add partition_by: option to to_parquet for Hive-style directory output (year=2024/month=01/data_0.parquet). Works single-node and distributed. Distributed partition_by uses FILENAME_PATTERN per worker to avoid file name collisions when multiple workers write to the same partition directories. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add property-based round-trip test, adversarial (nulls, special chars, reserved words), scale (1000 rows / 50 partitions), empty result, string column names. Add peer tests for local-vs-distributed equivalence and 3-worker scale. Fix distributed partition_by race condition: each worker now writes to its own subdirectory (__w0/, __w1/) to avoid concurrent directory creation collisions. Auto-create output directory for local paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Add
partition_by:option toto_parquet/3for Hive-style partitioned directory output. Works both single-node and distributed.Usage
Details
PARTITION_BY ("col")to DuckDB COPY optionsFILENAME_PATTERN "w{idx}_{i}"per worker to prevent file name collisions when multiple workers write to overlapping partition directoriesgroup):compressionand other COPY optionsTest plan
🤖 Generated with Claude Code