cloudberry
cloudberry copied to clipboard
Add attribute encoding to partition roots
This commit adds pg_attribute_encoding entries for root partitions, During create statement, we add attribute encoding entries to catalog If the table has a parent partition, and no options or encodings are specified, we copy the parent partition's encoding entries
For partitioned table create statement, we pick the explicitly defined column encoding for the parent over the table-level option defined for the child partition.
The storage encoding clause for a column is picked as follows:
-
- An explicit encoding clause in the ColumnDef of self/parent
-
- A column reference storage directive for this column
-
- A default column encoding in the statement
-
- Parent partition's column encoding values
-
- A default for the type.
Add attribute encodings to d+ description for root partitions
Added tests to check comlumn encoding inheritance priority
Fixes #ISSUE_Number
What does this PR do?
Type of Change
- [ ] Bug fix (non-breaking change)
- [ ] New feature (non-breaking change)
- [ ] Breaking change (fix or feature with breaking changes)
- [ ] Documentation update
Breaking Changes
Test Plan
- [ ] Unit tests added/updated
- [ ] Integration tests added/updated
- [ ] Passed
make installcheck - [ ] Passed
make -C src/test installcheck-cbdb-parallel
Impact
Performance:
User-facing changes:
Dependencies:
Checklist
- [ ] Followed contribution guide
- [ ] Added/updated documentation
- [ ] Reviewed code for security implications
- [ ] Requested review from cloudberry committers