Skip to content

Commit

Permalink
fix after review
Browse files Browse the repository at this point in the history
  • Loading branch information
zstan committed Oct 12, 2023
1 parent 6f78a2e commit 56f811c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,9 @@ static <RowT> BinaryTuplePrefix toBinaryTuplePrefix(

assert prefixColumnsCount == indexedColumnsCount : "Invalid range condition";

int rowColumnsCount = 0;
for (int i = 0; i < prefixColumnsCount; i++) {
if (unspecified.get(i)) {
break;
}
int pos = unspecified.nextSetBit(0);

rowColumnsCount++;
}
int rowColumnsCount = pos == -1 ? prefixColumnsCount : pos;

BinaryTuplePrefixBuilder tupleBuilder = new BinaryTuplePrefixBuilder(rowColumnsCount, indexedColumnsCount);

Expand Down Expand Up @@ -118,7 +113,8 @@ private static <RowT> ByteBuffer toByteBuffer(
BinaryTupleSchema binarySchema,
RowHandler<RowT> handler,
BinaryTupleBuilder tupleBuilder,
RowT searchRow, int colCount
RowT searchRow,
int colCount
) {
for (int i = 0; i < colCount; i++) {
Object val = handler.get(i, searchRow);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,6 @@
public class ExpressionFactoryImpl<RowT> implements ExpressionFactory<RowT> {
private static final int CACHE_SIZE = 1024;

// We use enums for placeholders because enum serialization/deserialization guarantees to preserve object's identity.
private enum Placeholder {
UNSPECIFIED_VALUE
}

private static final ConcurrentMap<String, Scalar> SCALAR_CACHE = Caffeine.newBuilder()
.maximumSize(CACHE_SIZE)
.<String, Scalar>build()
Expand Down

0 comments on commit 56f811c

Please sign in to comment.