Skip to content

compaction now only identifies multi-value dimensions for dimension schemas which can possibly produce them#18760

Merged
clintropolis merged 3 commits into
apache:masterfrom
clintropolis:more-chill-msq-compaction
Dec 2, 2025
Merged

compaction now only identifies multi-value dimensions for dimension schemas which can possibly produce them#18760
clintropolis merged 3 commits into
apache:masterfrom
clintropolis:more-chill-msq-compaction

Conversation

@clintropolis

Copy link
Copy Markdown
Member

Description

changes:

  • added DimensionSchema.canBeMultiValued(), defaulting to false but true for StringDimensionSchema and NewSpatialDimensionSchema
  • CompactionTask.identifyMultiValuedDimensions now checks DimensionSchema.canBeMultiValued() instead of checking for ColumnType.STRING from DimensionSchema.getColumnType()
  • added test to confirm behavior using AutoTypeColumnSchema with a specified castToType of ColumnType.STRING, which prior to changes would identify as multi-valued despite auto never producing them

…chemas which can possibly produce them

changes:
* added `DimensionSchema.canBeMultiValued`, defaulting to false but true for `StringDimensionSchema` and `NewSpatialDimensionSchema`
* `CompactionTask.identifyMultiValuedDimensions` now checks `DimensionSchema.canBeMultiValued()` instead of checking for `ColumnType.STRING` from `DimensionSchema.getColumnType()`
* added test to confirm behavior using `AutoTypeColumnSchema` with a specified `castToType` of `ColumnType.STRING`, which prior to changes would identify as multi-valued despite auto never producing them
public abstract ColumnType getColumnType();

@JsonIgnore
public boolean canBeMultiValued()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Javadoc please. It always helps even for things that may be obvious to certain eyes.

* <li> Range partitioning is done on a string dimension or an unknown dimension
* <li> Range partitioning is done on a possibly multi-valued string dimension or an unknown dimension
* (since MSQ does not support partitioning on a multi-valued string dimension) </li>
* <li> Rollup is done on a string dimension or an unknown dimension

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
* <li> Rollup is done on a string dimension or an unknown dimension
* <li> Rollup is done on a possibly multi-valued string dimension or an unknown dimension

@kfaraz

kfaraz commented Nov 23, 2025

Copy link
Copy Markdown
Contributor

IT failure is unrelated.

@clintropolis
clintropolis merged commit 9b6d18f into apache:master Dec 2, 2025
83 of 85 checks passed
@clintropolis
clintropolis deleted the more-chill-msq-compaction branch December 2, 2025 23:25
@kgyrtkirk kgyrtkirk added this to the 36.0.0 milestone Jan 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants