You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2022/12/06 11:28:12 UTC

[GitHub] [druid] abhishekagarwal87 commented on a diff in pull request #13508: Better error message when theta_sketch_intersect is used on scalar expression

abhishekagarwal87 commented on code in PR #13508:
URL: https://github.com/apache/druid/pull/13508#discussion_r1040849799


##########
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/sql/ThetaSketchSetBaseOperatorConversion.java:
##########
@@ -63,6 +63,8 @@ public DruidExpression toDruidExpression(
       RexNode rexNode
   )
   {
+    plannerContext.setPlanningError("%s can only be used on aggregates. " +
+        "It cannot be used directly on a column or or on a scalar expression.", getFunctionName());

Review Comment:
   the type check is already done. This tells the user that they are trying to use the function as an expression while its only available as a post aggregator. 



-- 
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-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org