public ImmutableBitSet selectColumnBlocks(ImmutableBitSet columns) { if (columns == null) columns = colAll; BitSet result = new BitSet(); for (int i = 0; i < colBlocks.length; i++) { ImmutableBitSet cb = colBlocks[i]; if (cb.intersects(columns)) { result.set(i); } } return new ImmutableBitSet(result); }
if (colBlocks[i].intersects(colBlocks[j])) throw new IllegalStateException();
private void validate(GTInfo info) { if (hasAggregation()) { if (aggrGroupBy.intersects(aggrMetrics) || aggrGroupBy.intersects(rtAggrMetrics)) throw new IllegalStateException(); if (aggrMetrics.cardinality() != aggrMetricsFuncs.length) throw new IllegalStateException(); if (columns == null) columns = ImmutableBitSet.EMPTY; columns = columns.or(aggrGroupBy); columns = columns.or(aggrMetrics); } if (columns == null) columns = info.colAll; if (hasFilterPushDown()) { validateFilterPushDown(info); } this.selectedColBlocks = info.selectColumnBlocks(columns.or(rtAggrMetrics).andNot(dynamicCols)); }
public ImmutableBitSet selectColumnBlocks(ImmutableBitSet columns) { if (columns == null) columns = colAll; BitSet result = new BitSet(); for (int i = 0; i < colBlocks.length; i++) { ImmutableBitSet cb = colBlocks[i]; if (cb.intersects(columns)) { result.set(i); } } return new ImmutableBitSet(result); }
if (colBlocks[i].intersects(colBlocks[j])) throw new IllegalStateException();
private void validate(GTInfo info) { if (hasAggregation()) { if (aggrGroupBy.intersects(aggrMetrics) || aggrGroupBy.intersects(rtAggrMetrics)) throw new IllegalStateException(); if (aggrMetrics.cardinality() != aggrMetricsFuncs.length) throw new IllegalStateException(); if (columns == null) columns = ImmutableBitSet.EMPTY; columns = columns.or(aggrGroupBy); columns = columns.or(aggrMetrics); } if (columns == null) columns = info.colAll; if (hasFilterPushDown()) { validateFilterPushDown(info); } this.selectedColBlocks = info.selectColumnBlocks(columns.or(rtAggrMetrics).andNot(dynamicCols)); }