shaofengshi commented on a change in pull request #397: KYLIN-3722 Disable limit push down after join URL: https://github.com/apache/kylin/pull/397#discussion_r243876893
########## File path: query/src/main/java/org/apache/kylin/query/relnode/OLAPLimitRel.java ########## @@ -82,7 +82,8 @@ public void implementOLAP(OLAPImplementor implementor) { // ignore limit after having clause // ignore limit after another limit, e.g. select A, count(*) from (select A,B from fact group by A,B limit 100) limit 10 // ignore limit after outer aggregate, e.g. select count(1) from (select A,B from fact group by A,B ) limit 10 - if (!context.afterHavingClauseFilter && !context.afterLimit && !context.afterOuterAggregate) { + // ignore limit after join + if (!context.afterHavingClauseFilter && !context.afterLimit && !context.afterOuterAggregate && !context.afterJoin) { Review comment: My concern is, this change may make many normal queries (join with the limit) much inefficient. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services