cloudberry icon indicating copy to clipboard operation
cloudberry copied to clipboard

Add attribute encoding to partition roots

Open reshke opened this issue 9 months ago • 0 comments

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:

    1. An explicit encoding clause in the ColumnDef of self/parent
    1. A column reference storage directive for this column
    1. A default column encoding in the statement
    1. Parent partition's column encoding values
    1. 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

Additional Context

CI Skip Instructions


reshke avatar Mar 01 '25 09:03 reshke