Skip to content

Add attribute encoding to partition roots#4

Open
reshke wants to merge 1 commit intomainfrom
jcjiodqwjioqwijog
Open

Add attribute encoding to partition roots#4
reshke wants to merge 1 commit intomainfrom
jcjiodqwjioqwijog

Conversation

@reshke
Copy link
Copy Markdown
Owner

@reshke reshke commented Feb 28, 2025

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


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
 * 2. A column reference storage directive for this column
 * 3. A default column encoding in the statement
 * 4. Parent partition's column encoding values
 * 5. A default for the type.

Add attribute encodings to d+ description for root partitions

Added tests to check comlumn encoding inheritance priority
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants