gszadovszky commented on a change in pull request #910:
URL: https://github.com/apache/parquet-mr/pull/910#discussion_r636797482



##########
File path: 
parquet-column/src/main/java/org/apache/parquet/column/values/dictionary/DictionaryValuesWriter.java
##########
@@ -173,7 +173,7 @@ public BytesInput getBytes() {
       BytesInput bytes = concat(BytesInput.from(bytesHeader), rleEncodedBytes);
       // remember size of dictionary when we last wrote a page
       lastUsedDictionarySize = getDictionarySize();
-      lastUsedDictionaryByteSize = dictionaryByteSize;
+      lastUsedDictionaryByteSize = (int) dictionaryByteSize;

Review comment:
       This method should not be called in case of `shouldFallBack()` returns 
true but we should be on the safe side and check the potential overflow.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to