nichunen commented on a change in pull request #785: KYLIN-4117 Auto adjust 
data type of RelNode for intersect_count
URL: https://github.com/apache/kylin/pull/785#discussion_r310978568
 
 

 ##########
 File path: 
query/src/main/java/org/apache/kylin/query/relnode/OLAPProjectRel.java
 ##########
 @@ -137,6 +158,16 @@ public void implementOLAP(OLAPImplementor implementor) {
         this.afterAggregate = context.afterAggregate;
 
         this.columnRowType = buildColumnRowType();
+        RelNode parentNode = implementor.getParentNode();
+        if (parentNode instanceof OLAPAggregateRel) {
+            OLAPAggregateRel rel = (OLAPAggregateRel) parentNode;
+            for (AggregateCall call : rel.getRewriteAggCalls()) {
+                if 
(call.getAggregation().getName().equalsIgnoreCase(BitmapMeasureType.FUNC_INTERSECT_COUNT_DISTINCT))
 {
+                    hasIntersect = true;
+                    logger.trace("Find intersect in query.");
 
 Review comment:
   Why not break here?

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