diff --git a/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java b/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java index e56edaad59ab..289bff97cc8f 100644 --- a/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java +++ b/core/trino-main/src/test/java/io/trino/operator/project/TestDictionaryAwarePageProjection.java @@ -197,7 +197,10 @@ public void testPreservesDictionaryInstance() assertInstanceOf(secondOutputBlock, DictionaryBlock.class); assertNotSame(firstOutputBlock, secondOutputBlock); - assertSame(((DictionaryBlock) firstOutputBlock).getDictionary(), ((DictionaryBlock) secondOutputBlock).getDictionary()); + Block firstDictionary = ((DictionaryBlock) firstOutputBlock).getDictionary(); + Block secondDictionary = ((DictionaryBlock) secondOutputBlock).getDictionary(); + assertSame(firstDictionary, secondDictionary); + assertSame(firstDictionary, dictionary); } private static DictionaryBlock createDictionaryBlock(int dictionarySize, int blockSize)