piby180 opened a new issue, #16309:
URL: https://github.com/apache/pinot/issues/16309

   ### Problem
   I followed the docs and added the following lines to pinot broker config
   
   `pinot.broker.query.rewriter.class.names: 
DEFAULT_QUERY_REWRITERS_CLASS_NAMES + 
",org.apache.pinot.sql.parsers.rewriter.ExprMinMaxRewriter"
   pinot.broker.result.rewriter.class.names: 
"org.apache.pinot.core.query.utils.rewriter.ParentAggregationResultRewriter"`
   
   But EXPR_MIN and EXPR_MAX functions are not working with error
   
   `Invalid aggregation function: exprmax($0,$0,$0,$0); Reason: Aggregation 
function: EXPRMAX is only supported in selection without alias.`
   
   even though there is no alias in the query
   `SELECT EXPR_MAX(table_name, num_segments, num_rows, last_update) from 
metadata_feeds`
   
   ### Error logs
   `2025/07/09 08:55:28.741 ERROR [MultiStageBrokerRequestHandler] 
[jersey-server-managed-async-executor-9] Caught exception executing request 
132994053000000852: SELECT EXPR_MAX(table_name, num_segments, num_rows, 
last_update)
   from metadata_feeds
   LIMIT 101, Unable to execute query plan for request: 132994053000000852 on 
server: 
pinot-server-2.pinot-server-headless.pinot-dev.svc.cluster.local@{8421,8442}, 
ERROR: java.util.concurrent.ExecutionException: java.lang.RuntimeException: 
Caught exception while submitting request: 132994053000000852, stage: 2
           at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
           at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
           at 
org.apache.pinot.query.service.server.QueryServer.forEachStage(QueryServer.java:307)
           at 
org.apache.pinot.query.service.server.QueryServer.submit(QueryServer.java:147)
   ...
   Caused by: java.lang.RuntimeException: Caught exception while submitting 
request: 132994053000000852, stage: 2
           at 
org.apache.pinot.query.service.server.QueryServer.submitStage(QueryServer.java:270)
           at 
org.apache.pinot.query.service.server.QueryServer.lambda$forEachStage$5(QueryServer.java:300)
           at 
java.base/java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768)
           ... 3 more
   ...
   Caused by: java.util.concurrent.ExecutionException: 
org.apache.pinot.spi.exception.BadQueryRequestException: Invalid aggregation 
function: exprmax($0,$0,$0,$0); Reason: Aggregation function: EXPRMAX is only 
supported in selection without alias.
           at 
java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:396)
           at 
java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:2096)
           at 
org.apache.pinot.query.service.server.QueryServer.submitStage(QueryServer.java:262)
           ... 5 more
   ...
   Caused by: org.apache.pinot.spi.exception.BadQueryRequestException: Invalid 
aggregation function: exprmax($0,$0,$0,$0); Reason: Aggregation function: 
EXPRMAX is only supported in selection without alias.
           at 
org.apache.pinot.core.query.aggregation.function.AggregationFunctionFactory.getAggregationFunction(AggregationFunctionFactory.java:487)
           at 
org.apache.pinot.query.runtime.operator.AggregateOperator.getAggFunction(AggregateOperator.java:228)
           at 
org.apache.pinot.query.runtime.operator.AggregateOperator.getAggFunctions(AggregateOperator.java:203)
           at 
org.apache.pinot.query.runtime.operator.AggregateOperator.<init>(AggregateOperator.java:79)
   
org.apache.pinot.query.service.dispatch.QueryDispatcher.lambda$submit$1(QueryDispatcher.java:188)
   
org.apache.pinot.query.service.dispatch.QueryDispatcher.execute(QueryDispatcher.java:248)
   
org.apache.pinot.query.service.dispatch.QueryDispatcher.submit(QueryDispatcher.java:185)
   
org.apache.pinot.query.service.dispatch.QueryDispatcher.submitAndReduce(QueryDispatcher.java:132)`


-- 
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]

Reply via email to