From 131f91b04ede9fa00b73448ad3ef8cea599eab09 Mon Sep 17 00:00:00 2001 From: "Jacob I. Komissar" Date: Sun, 7 Nov 2021 16:54:07 -0500 Subject: [PATCH] Add explicit int/long cast in TypedSet This silences a warning from IntelliJ, (and the re-wrapping of the line makes sure you can see the whole expression in a reasonable-sized window). --- .../main/java/io/trino/operator/aggregation/TypedSet.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java index a018bb1286c2..207709f85a2c 100644 --- a/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java +++ b/core/trino-main/src/main/java/io/trino/operator/aggregation/TypedSet.java @@ -176,7 +176,10 @@ private TypedSet( public long getRetainedSizeInBytes() { - return INSTANCE_SIZE + INT_ARRAY_LIST_INSTANCE_SIZE + elementBlock.getRetainedSizeInBytes() + blockPositionByHash.size() * Integer.BYTES; + return INSTANCE_SIZE + + INT_ARRAY_LIST_INSTANCE_SIZE + + elementBlock.getRetainedSizeInBytes() + + blockPositionByHash.size() * (long) Integer.BYTES; } public boolean contains(Block block, int position)