fix: deserialize parquet error when stream's base table modify column type #18828
+100
−21
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.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
This PR fixes an issue where reading or deserializing Parquet data from a stream fails if the base table’s column type has been modified after the stream was created.
When a base table column’s data type changes, the system now drops the old column and re-adds it to regenerate a new column_id. This ensures consistency between the schema definition and column identifiers, preventing mismatched schemas during Parquet deserialization.
Modifying columns while Change Tracking is active should be avoided. Changing schema definitions during change tracking may break consistency between tracked changes and the current table schema, leading to incorrect or incomplete change records.
Fixes: #18827
Tests
Type of change
This change is