Akshat-Jain commented on code in PR #16682:
URL: https://github.com/apache/druid/pull/16682#discussion_r1681068230


##########
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/hll/sql/HllSketchBaseSqlAggregator.java:
##########
@@ -154,6 +155,15 @@ public Aggregation toDruidAggregation(
       }
 
       if (inputType.is(ValueType.COMPLEX)) {
+        if (!isValidComplexInputType(inputType)) {
+          plannerContext.setPlanningError(
+              "Using APPROX_COUNT_DISTINCT() or enabling approximation with 
COUNT(DISTINCT) is not supported for"
+              + " column type [%s]. You can disable approximation, use 
COUNT(DISTINCT %s) and rerun the query.",
+              columnArg.getDruidType(),
+              columnArg.getSimpleExtraction().getColumn()

Review Comment:
   Makes sense, made the change.



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