fix(sql): export parquet support empty table/partition#6420
fix(sql): export parquet support empty table/partition#6420bluestreak01 merged 5 commits intomasterfrom
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the WalkthroughThis PR modifies parquet export functionality to gracefully handle empty source tables. Changes include removing row count validation in the Rust schema layer, implementing per-partition empty detection and population in Java serialization, and adding tests verifying successful export of empty tables with proper schema. Changes
Sequence Diagram(s)sequenceDiagram
participant Exporter as SerialParquetExporter
participant PE as PartitionEncoder
participant TR as TableReader
participant Desc as PartitionDescriptor
rect rgb(230, 245, 230)
Note over Exporter: New Flow: Per-Partition Empty Handling
Exporter->>Exporter: For each partition
Exporter->>Exporter: Check if empty (openPartition <= 0)
alt Partition Empty
Exporter->>PE: populateEmptyPartition()
PE->>TR: Get table metadata
PE->>Desc: Set table name, timestamp index
PE->>Desc: Populate metadata columns (non-zero types)
PE-->>Exporter: Partition descriptor populated
else Partition Not Empty
Exporter->>PE: populateFromTableReader()
PE-->>Exporter: Partition descriptor populated
end
Exporter->>Exporter: Mark CONVERTING_PARTITIONS → FINISHED
Exporter->>Exporter: If no export result, MOVE_FILES → FINISHED
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Suggested reviewers
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@CodeRabbit review |
✅ Actions performedReview triggered.
|
[PR Coverage check]😍 pass : 23 / 23 (100.00%) file detail
|
Fixes Parquet export to properly handle empty tables and partitions. Previously, exporting empty table could fail. This change ensures that valid Parquet files with only schema are generated.
close #6318