Jackie-Jiang opened a new pull request, #20003: URL: https://github.com/apache/pinot/pull/20003
Sorted-prefix ORDER BY currently projects every output expression unless `lateMaterializeSortedOrderBy` is enabled, while the generic ORDER BY path automatically defers expressions that are not needed for ordering. Make the sorted path use the same behavior: project order-by expressions during selection, then fetch any remaining output expressions for the surviving rows. Follow-up to #19879 addressing [the outstanding review comments](https://github.com/apache/pinot/pull/19879#pullrequestreview-5552180339): - Remove the query option, its constants/parser, the internal `lateMaterialize` flag and constructor overloads, and the eligibility heuristic for scans bounded by the limit. - Simplify schema construction and reuse null restoration with a destination-column offset. - Cache the surviving-document cardinality check and correct the assertion and scan-accounting comments. Actual column rereads remain counted. - Replace option-toggle tests with default-behavior assertions, including ASC/DESC/reverse scans, offsets, deferred transforms/nulls, and sparse document IDs spanning multiple batches. Update the text-match explain plan for the smaller initial projection. Validation on JDK 25: all 232 tests across `LinearSelectionOrderByOperatorTest`, the three `InnerSegmentSelection*QueriesTest` classes, `NullHandlingEnabledQueriesTest`, `TextMatchTransformFunctionTest`, and `ExplainPlanQueriesTest` passed. The reactor compiled current dependencies with deprecation/warning reporting; no compiler warnings occur on added lines. Spotless, checkstyle, and license formatting/checks passed for `pinot-common`, `pinot-core`, and `pinot-spi`. -- 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]
