waterWang opened a new pull request, #19146: URL: https://github.com/apache/pinot/pull/19146
## Description Fixes #19145 The non-scan (metadata/dictionary based) aggregation path treats `MINLONG`, `MAXLONG`, `MINSTRING`, and `MAXSTRING` as resolvable if the column merely **has a dictionary**, without checking that the column type is one the function actually supports. This causes inconsistent behavior: - **`MINLONG`/`MAXLONG` over `FLOAT`/`DOUBLE`/`BIG_DECIMAL`**: `IllegalArgumentException` is thrown (the non-scan path is too strict — the scan path computes the result fine). - **`MINSTRING`/`MAXSTRING` over numeric columns**: silently returns a wrong result from the dictionary (the non-scan path is too lax — the scan path correctly rejects with `BadQueryRequestException`). ### Fix Add type precondition checks in `isFitForNonScanBasedPlan()` so unsupported column-type combinations fall back to the scan path: - `MINLONG` / `MAXLONG`: require stored type `INT` or `LONG` - `MINSTRING` / `MAXSTRING`: require stored type `STRING` ### Testing - `MINLONG(doubleCol)`, `MAXLONG(doubleCol)`, `MINSTRING(intCol)`, `MAXSTRING(intCol)` on a single dictionary-encoded column with no filter now correctly fall back to the scan path, matching the behavior of mixed queries like `MINLONG(doubleCol), SUM(intCol)`. -- 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]
