Skip to content

Commit

Permalink
Remove redundant cast
Browse files Browse the repository at this point in the history
  • Loading branch information
findepi committed Sep 19, 2022
1 parent b9b373c commit 30d9b3c
Show file tree
Hide file tree
Showing 31 changed files with 31 additions and 31 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ public long getEstimatedDataSizeForStats(int position)
public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(block, block.getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer.accept(values, values.getRetainedSizeInBytes());
consumer.accept(offsets, sizeOf(offsets));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(values, sizeOf(values));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(dictionary, dictionary.getRetainedSizeInBytes());
consumer.accept(ids, sizeOf(ids));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(values, sizeOf(values));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer.accept(high, sizeOf(high));
consumer.accept(low, sizeOf(low));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(values, sizeOf(values));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ private void grow(int newCapacity)
}

if (newCapacity > array.length) {
int newLength = (int) Math.min(Math.max(2L * (long) array.length, (long) newCapacity), MAX_ARRAY_SIZE);
int newLength = (int) Math.min(Math.max(2L * array.length, newCapacity), MAX_ARRAY_SIZE);
array = Arrays.copyOf(array, newLength);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ public long getEstimatedDataSizeForStats(int position)
public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
getBlock().retainedBytesForEachPart(consumer);
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(values, sizeOf(values));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer.accept(mapIsNull, sizeOf(mapIsNull));
}
consumer.accept(hashTables, hashTables.getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer.accept(offsets, sizeOf(offsets));
consumer.accept(mapIsNull, sizeOf(mapIsNull));
consumer.accept(hashTables, hashTables.getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (rowIsNull != null) {
consumer.accept(rowIsNull, sizeOf(rowIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
}
consumer.accept(fieldBlockOffsets, sizeOf(fieldBlockOffsets));
consumer.accept(rowIsNull, sizeOf(rowIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public long getEstimatedDataSizeForStats(int position)
public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(value, value.getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(values, sizeOf(values));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public long getRetainedSizeInBytes()
public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(blockBuilder, blockBuilder.getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer.accept(mapBlock.getRawKeyBlock(), mapBlock.getRawKeyBlock().getRetainedSizeInBytes());
consumer.accept(mapBlock.getRawValueBlock(), mapBlock.getRawValueBlock().getRetainedSizeInBytes());
consumer.accept(mapBlock.getHashTables(), mapBlock.getHashTables().getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
{
consumer.accept(keyBlockBuilder, keyBlockBuilder.getRetainedSizeInBytes());
consumer.accept(valueBlockBuilder, valueBlockBuilder.getRetainedSizeInBytes());
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
for (Block fieldBlock : fieldBlocks) {
consumer.accept(fieldBlock, fieldBlock.getRetainedSizeInBytes());
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
for (BlockBuilder fieldBlockBuilder : fieldBlockBuilders) {
consumer.accept(fieldBlockBuilder, fieldBlockBuilder.getRetainedSizeInBytes());
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
if (valueIsNull != null) {
consumer.accept(valueIsNull, sizeOf(valueIsNull));
}
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ public void retainedBytesForEachPart(ObjLongConsumer<Object> consumer)
consumer.accept(sliceOutput, sliceOutput.getRetainedSize());
consumer.accept(offsets, sizeOf(offsets));
consumer.accept(valueIsNull, sizeOf(valueIsNull));
consumer.accept(this, (long) INSTANCE_SIZE);
consumer.accept(this, INSTANCE_SIZE);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private VarcharType(int length)
super(
new TypeSignature(
StandardTypes.VARCHAR,
singletonList(TypeSignatureParameter.numericParameter((long) length))),
singletonList(TypeSignatureParameter.numericParameter(length))),
Slice.class);

if (length < 0) {
Expand Down

0 comments on commit 30d9b3c

Please sign in to comment.