himanish-star opened a new pull request, #18774: URL: https://github.com/apache/pinot/pull/18774
## Problem A table config that references **timestamp-index derived columns** (`\$<column>\$<GRANULARITY>`, e.g. `\$OrderDate\$DAY`) in `starTreeIndexConfigs[].dimensionsSplitOrder` is rejected by `TableConfigUtils` validation with: ``` Failed to find dimension column: $OrderDate$DAY specified in star-tree index config in schema ``` These derived columns are declared via `fieldConfigList[].timestampConfig.granularities` and are materialized as dictionary-encoded, single-value `TIMESTAMP` columns **at segment generation time** (`TimestampIndexUtils#applyTimestampIndex`). They are therefore absent from the schema during config validation, even though the configuration is valid and works at runtime. Today the only workaround is to push the config through the REST API with validation skipped. ## Fix `validateStarTreeIndexConfigs` now receives the set of declared timestamp-index columns (`TimestampIndexUtils#extractColumnsWithGranularity`) and accepts them in `dimensionsSplitOrder` without a schema lookup — matching how they are handled at segment generation time. Columns whose granularity is **not** declared in `timestampConfig` are still rejected. ## Testing Added `TableConfigUtilsTest#testValidateStarTreeIndexWithTimestampIndexDerivedColumns`: - A star-tree config using `\$OrderDate\$DAY/WEEK/MONTH` with matching `timestampConfig` granularities now validates. - A star-tree dimension referencing an **undeclared** granularity (`\$OrderDate\$HOUR`) still fails validation. `checkstyle:check` and `license:check` pass on `pinot-segment-local`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
