Skip to content

PHOENIX-6868 - Inheritable table level properties from data table to indexes - #2612

Open
ujjawal4046 wants to merge 1 commit into
apache:masterfrom
ujjawal4046:PHOENIX-6868
Open

PHOENIX-6868 - Inheritable table level properties from data table to indexes#2612
ujjawal4046 wants to merge 1 commit into
apache:masterfrom
ujjawal4046:PHOENIX-6868

Conversation

@ujjawal4046

@ujjawal4046 ujjawal4046 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

  • phoenix.index.inheritableTableDescriptorProperties which can be used to propagate custom table properties from parent to indexes

Why are the changes needed?

Does this PR introduce any user-facing change?

How was this patch tested?

Was this patch authored or co-authored using generative AI tooling?

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

There is an inconsistency in index-property validation (CDC index exemption vs other enforcement) and at least one misleading test comment that should be corrected before merging.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR adds support for inheriting selected HBase TableDescriptor properties from a Phoenix data table to its index tables (PHOENIX-6868), controlled by a new configuration key.

Changes:

  • Introduces phoenix.index.inheritableTableDescriptorProperties to configure which custom table-descriptor properties should be propagated to index tables.
  • Implements inheritance of configured properties during index table descriptor generation and propagation on ALTER TABLE to keep indexes in sync.
  • Adds end-to-end integration tests covering inheritance behavior and disallowing direct overrides on index tables.
File summaries
File Description
phoenix-core/src/it/java/org/apache/phoenix/end2end/InheritableTablePropertiesIT.java Adds IT coverage for inheriting configured table-descriptor props to global/local/view indexes and for disallowing direct index overrides.
phoenix-core-client/src/main/java/org/apache/phoenix/util/MetaDataUtil.java Adds helpers to parse configured inheritable table-descriptor properties and check whether a property is inheritable.
phoenix-core-client/src/main/java/org/apache/phoenix/schema/MetaDataClient.java Rejects setting configured inheritable table-descriptor properties directly on index DDL.
phoenix-core-client/src/main/java/org/apache/phoenix/query/QueryServices.java Adds the configuration key constant for inheritable table-descriptor properties.
phoenix-core-client/src/main/java/org/apache/phoenix/query/ConnectionQueryServicesImpl.java Inherits configured props during index table descriptor generation and propagates changes to related index table descriptors during ALTER TABLE.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1215 to +1222
// PHOENIX-6868: Disallow setting inheritable table descriptor properties on indexes
if (tableType == PTableType.INDEX && !isCDCIndex
&& MetaDataUtil.isInheritableTableDescriptorProperty(
connection.getQueryServices().getConfiguration(), prop.getFirst())) {
throw new SQLExceptionInfo.Builder(
SQLExceptionCode.CANNOT_SET_OR_ALTER_PROPERTY_FOR_INDEX)
.setMessage("Property: " + prop.getFirst()).build().buildException();
}
Comment on lines +305 to +307
// Test when no inheritable properties are configured, custom properties should not propagate
// (this test uses the default configured properties from doSetup, so we check that only
// CUSTOM_PROP_1 and CUSTOM_PROP_2 propagate and nothing else)
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