yashmayya opened a new pull request, #15603: URL: https://github.com/apache/pinot/pull/15603
- Currently, a filtered aggregate with a compound filter like `SUM(x) FILTER (WHERE y > 100 AND y < 100)` fails with an NPE like: ``` java.lang.NullPointerException: Cannot invoke "org.apache.pinot.common.request.context.predicate.Predicate.getLhs()" because "predic ate" is null at org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.rewriteQueryContextWithHints(InstancePlanMakerImplV2.java:384) ~ [startree-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.makeSegmentPlanNode(InstancePlanMakerImplV2.java:303) ~[startree -pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.makeStreamingSegmentPlanNode(InstancePlanMakerImplV2.java:357) ~ [startree-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.plan.maker.InstancePlanMakerImplV2.makeStreamingInstancePlan(InstancePlanMakerImplV2.java:341) ~[st artree-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.planCombineQuery(ServerQueryExecutorV1Impl.java:688) ~[sta rtree-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.executeQuery(ServerQueryExecutorV1Impl.java:731) ~[startre e-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.execute(ServerQueryExecutorV1Impl.java:714) ~[startree-pin ot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.executeInternal(ServerQueryExecutorV1Impl.java:446) ~[star tree-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.executeInternal(ServerQueryExecutorV1Impl.java:317) ~[star tree-pinot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] at org.apache.pinot.core.query.executor.ServerQueryExecutorV1Impl.execute(ServerQueryExecutorV1Impl.java:144) ~[startree-pin ot-all-1.4.0-ST.38-jar-with-dependencies.jar:1.4.0-ST.38-6daa00d9c7072acbeeba512281c73d66385369cf] ``` - This is because the `FilterContext` class can have `null` predicates for compound filters like `AND`, `OR`, `NOT` - these filters have non-null children filters instead. There was already a helper method for recursively adding the expression override hints to such filters, but its usage was missed in this filtered aggregation context. This patch simply updates the logic to use that helper method. -- 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: commits-unsubscr...@pinot.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org For additional commands, e-mail: commits-h...@pinot.apache.org