danny0405 commented on a change in pull request #1835: [CALCITE-3830] The 
‘approximate’ field should be considered when computing the digest of 
AggregateCall
URL: https://github.com/apache/calcite/pull/1835#discussion_r385035808
 
 

 ##########
 File path: core/src/main/java/org/apache/calcite/rel/core/AggregateCall.java
 ##########
 @@ -292,9 +292,15 @@ public AggregateCall rename(String name) {
   }
 
   public String toString() {
-    StringBuilder buf = new StringBuilder(aggFunction.toString());
+    StringBuilder buf = new StringBuilder();
+    // currently approximate = true is only for 'APPROX_COUNT_DISTINCT'
+    if (approximate && distinct) {
+      buf.append("APPROX_COUNT_DISTINCT");
+    } else {
 
 Review comment:
   Either is fine to me, go with your choice. BTW, that format of the 
approximate call would be like ? `approximate call_name(args)`  ? or 
`call_name()... filter $0 approximate` ?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to