Skip to content

feat: add support for specifying DimensionSchema to catalog clustered segment spec - #19770

Merged
clintropolis merged 2 commits into
apache:masterfrom
clintropolis:catalog-base-spec-schemas
Jul 28, 2026
Merged

feat: add support for specifying DimensionSchema to catalog clustered segment spec#19770
clintropolis merged 2 commits into
apache:masterfrom
clintropolis:catalog-base-spec-schemas

Conversation

@clintropolis

Copy link
Copy Markdown
Member

Description

Follow-up to #19711, this PR allows optionally specifying the DimensionSchema of any columns defined in the catalog clustered segment metadata. This is used to allow customization of how the column is physically stored instead of using the the default for the type defined in the logical schema. The type must match the logical type.

@github-actions github-actions Bot added Area - Batch Ingestion Area - Querying Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Jul 27, 2026

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Severity Findings
P0 0
P1 0
P2 1
P3 0
Total 1
Severity Findings
P0 0
P1 0
P2 1
P3 0
Total 1

Reviewed 6 of 6 changed files.


This is an automated review by Codex GPT-5.6-Sol

{
final Map<String, DimensionSchema> customSchemas = new HashMap<>();
for (DimensionSchema schema : columnSchemas) {
if (customSchemas.put(schema.getName(), schema) != null) {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] Reject null column-schema entries

Jackson permits null list elements, so a payload such as "columnSchemas":[null] reaches catalog validation and throws an NPE at schema.getName() instead of returning an InvalidInput response. Explicitly reject null entries before indexing the schemas.

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.

Since the prior review, null columnSchemas entries are explicitly rejected with InvalidInput and covered by a regression test. The prior null-dereference issue is addressed.

Reviewed 6 of 6 changed files.


This is an automated review by Codex GPT-5.6-Sol

@clintropolis
clintropolis merged commit ea69000 into apache:master Jul 28, 2026
28 checks passed
@clintropolis
clintropolis deleted the catalog-base-spec-schemas branch July 28, 2026 22:44
@github-actions github-actions Bot added this to the 39.0.0 milestone Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 Area - Querying

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants