somu-imply commented on a change in pull request #12195:
URL: https://github.com/apache/druid/pull/12195#discussion_r791264927



##########
File path: 
sql/src/main/java/org/apache/druid/sql/calcite/run/NativeQueryMaker.java
##########
@@ -122,6 +125,24 @@ public boolean feature(QueryFeature feature)
         );
       }
     }
+    int numFilters = 
plannerContext.getPlannerConfig().getMaxNumericInFilters();
+    if (numFilters < 1) {
+      throw new CannotBuildQueryException("maxNumericInFilters must be greater 
than 0");
+    }
+    //special corner case handling for numeric IN filters
+    if (query.getFilter() instanceof OrDimFilter) {
+      OrDimFilter orDimFilter = (OrDimFilter) query.getFilter();
+      if (orDimFilter.getFields().size() > numFilters) {
+        String dimension = ((BoundDimFilter) 
(orDimFilter.getFields().get(0))).getDimension();
+        throw new CannotBuildQueryException(StringUtils.format(
+            "Filters for column [%s] exceeds configured filter limit of [%s]. 
Cast [%s] values to String",

Review comment:
       I have updated to make them more meaningful




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