/** * in contrast to the limit in SQL concept, "limit push down" means * whether the limit is effective in storage level. Some queries are not possible * to leverage limit clause, checkout * {@link GTCubeStorageQueryBase#enableStorageLimitIfPossible(org.apache.kylin.cube.cuboid.Cuboid, java.util.Collection, java.util.Set, java.util.Collection, org.apache.kylin.metadata.filter.TupleFilter, java.util.Set, java.util.Collection, org.apache.kylin.storage.StorageContext)} */ public boolean isLimitPushDownEnabled() { return isValidPushDownLimit(finalPushDownLimit); }
public static boolean mergeSortPartitionResults(int finalPushDownLimit) { return isValidPushDownLimit(finalPushDownLimit); }
public void applyLimitPushDown(IRealization realization, StorageLimitLevel storageLimitLevel) { if (storageLimitLevel == StorageLimitLevel.NO_LIMIT) { return; } if (!realization.supportsLimitPushDown()) { logger.warn("Not enabling limit push down because cube storage type not supported"); return; } long temp = this.getOffset() + this.getLimit(); if (!isValidPushDownLimit(temp)) { logger.warn("Not enabling limit push down because current limit is invalid: " + this.getLimit()); return; } this.finalPushDownLimit = (int) temp; this.storageLimitLevel = storageLimitLevel; logger.info("Enabling limit push down: {} at level: {}", temp, storageLimitLevel); }
/** * in contrast to the limit in SQL concept, "limit push down" means * whether the limit is effective in storage level. Some queries are not possible * to leverage limit clause, checkout * {@link GTCubeStorageQueryBase#enableStorageLimitIfPossible(org.apache.kylin.cube.cuboid.Cuboid, java.util.Collection, java.util.Set, java.util.Collection, org.apache.kylin.metadata.filter.TupleFilter, java.util.Set, java.util.Collection, org.apache.kylin.storage.StorageContext)} */ public boolean isLimitPushDownEnabled() { return isValidPushDownLimit(finalPushDownLimit); }
public static boolean mergeSortPartitionResults(int finalPushDownLimit) { return isValidPushDownLimit(finalPushDownLimit); }
public void applyLimitPushDown(IRealization realization, StorageLimitLevel storageLimitLevel) { if (storageLimitLevel == StorageLimitLevel.NO_LIMIT) { return; } if (!realization.supportsLimitPushDown()) { logger.warn("Not enabling limit push down because cube storage type not supported"); return; } long temp = this.getOffset() + this.getLimit(); if (!isValidPushDownLimit(temp)) { logger.warn("Not enabling limit push down because current limit is invalid: " + this.getLimit()); return; } this.finalPushDownLimit = (int) temp; this.storageLimitLevel = storageLimitLevel; logger.info("Enabling limit push down: {} at level: {}", temp, storageLimitLevel); }