@Test public void testSetLimit() { StorageContext storageContext = new StorageContext(); storageContext.setLimit(10); assertEquals(StorageLimitLevel.NO_LIMIT, storageContext.getStorageLimitLevel()); assertFalse(storageContext.isLimitPushDownEnabled()); assertEquals(Integer.MAX_VALUE, storageContext.getFinalPushDownLimit()); storageContext.setLimit(0); assertEquals(StorageLimitLevel.NO_LIMIT, storageContext.getStorageLimitLevel()); assertFalse(storageContext.isLimitPushDownEnabled()); assertEquals(Integer.MAX_VALUE, storageContext.getFinalPushDownLimit()); }
public void setLimit(int l) { if (limit != Integer.MAX_VALUE) { logger.warn("Setting limit to {} but in current olap context, the limit is already {}, won't apply", l, limit); } else { limit = l; } }
StorageContext { public void setLimit(int l) { if (limit != Integer.MAX_VALUE) { logger.warn("Setting limit to {} but in current olap context, the limit is already {}, won't apply", l, limit); } else { limit = l; } } }
StorageContext { public void setLimit(int l) { if (limit != Integer.MAX_VALUE) { logger.warn("Setting limit to {} but in current olap context, the limit is already {}, won't apply", l, limit); } else { limit = l; } } StorageContext();  StorageContext(int ctxId); }
StorageContext { public void setLimit(int l) { if (limit != Integer.MAX_VALUE) { logger.warn("Setting limit to {} but in current olap context, the limit is already {}, won't apply", l, limit); } else { limit = l; } } StorageContext();  StorageContext(int ctxId); long getFilterMask(); void setFilterMask(long filterMask); StorageURL getConnUrl(); void setConnUrl(StorageURL connUrl); void setLimit(int l); void setOverlookOuterLimit(); int getOffset(); void setOffset(int offset); boolean isLimitPushDownEnabled(); static boolean isValidPushDownLimit(long finalPushDownLimit); int getFinalPushDownLimit(); StorageLimitLevel getStorageLimitLevel(); void applyLimitPushDown(IRealization realization, StorageLimitLevel storageLimitLevel); boolean mergeSortPartitionResults(); static boolean mergeSortPartitionResults(int finalPushDownLimit); void markSort(); boolean hasSort(); void setCuboid(Cuboid c); Cuboid getCuboid(); CuboidToGridTableMapping getMapping(); void setMapping(CuboidToGridTableMapping mapping); long getProcessedRowCount(); long increaseProcessedRowCount(long count); boolean isAcceptPartialResult(); void setAcceptPartialResult(boolean acceptPartialResult); boolean isPartialResultReturned(); void setPartialResultReturned(boolean partialResultReturned); boolean isNeedStorageAggregation(); void setNeedStorageAggregation(boolean needStorageAggregation); void setExactAggregation(boolean isExactAggregation); boolean isExactAggregation(); void enableCoprocessor(); boolean isCoprocessorEnabled(); Range<Long> getReusedPeriod(); void setReusedPeriod(Range<Long> reusedPeriod); IStorageQuery getStorageQuery(); void setStorageQuery(IStorageQuery storageQuery); boolean isStreamAggregateEnabled(); void enableStreamAggregate(); }
StorageContext { public void setLimit(int l) { if (limit != Integer.MAX_VALUE) { logger.warn("Setting limit to {} but in current olap context, the limit is already {}, won't apply", l, limit); } else { limit = l; } } StorageContext();  StorageContext(int ctxId); long getFilterMask(); void setFilterMask(long filterMask); StorageURL getConnUrl(); void setConnUrl(StorageURL connUrl); void setLimit(int l); void setOverlookOuterLimit(); int getOffset(); void setOffset(int offset); boolean isLimitPushDownEnabled(); static boolean isValidPushDownLimit(long finalPushDownLimit); int getFinalPushDownLimit(); StorageLimitLevel getStorageLimitLevel(); void applyLimitPushDown(IRealization realization, StorageLimitLevel storageLimitLevel); boolean mergeSortPartitionResults(); static boolean mergeSortPartitionResults(int finalPushDownLimit); void markSort(); boolean hasSort(); void setCuboid(Cuboid c); Cuboid getCuboid(); CuboidToGridTableMapping getMapping(); void setMapping(CuboidToGridTableMapping mapping); long getProcessedRowCount(); long increaseProcessedRowCount(long count); boolean isAcceptPartialResult(); void setAcceptPartialResult(boolean acceptPartialResult); boolean isPartialResultReturned(); void setPartialResultReturned(boolean partialResultReturned); boolean isNeedStorageAggregation(); void setNeedStorageAggregation(boolean needStorageAggregation); void setExactAggregation(boolean isExactAggregation); boolean isExactAggregation(); void enableCoprocessor(); boolean isCoprocessorEnabled(); Range<Long> getReusedPeriod(); void setReusedPeriod(Range<Long> reusedPeriod); IStorageQuery getStorageQuery(); void setStorageQuery(IStorageQuery storageQuery); boolean isStreamAggregateEnabled(); void enableStreamAggregate(); final int ctxId; }