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

 ##########
 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:
   I would prefer to add some distinct flag to AggregateCall rather than  
Aggregate,  because  'approximate' is a property of AggregateCall, not 
Aggregate. What do you think, Danny?

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