Bug description
RangeBitmapFileIndex's Writer parses the user-facing chunk-size option (per-column: fileindex.rangebitmap.<col>.chunk-size) with (int) MemorySize.parse(...).getBytes(). Any value above Integer.MAX_VALUE — e.g. the legitimate "2g" a user might set to effectively disable chunking — silently narrows to a negative int, and the writer then crashes with an unrelated failure deep inside the first chunk creation.
The chunk size becomes an eagerly allocated per-chunk buffer (FixedLengthChunk does ByteBuffer.allocate(limitedSerializedSizeInBytes)), so values beyond int range can never work in the current design.
Expected behavior
A clear validation error naming the option and the offending value, instead of a silent truncation and a deep crash.
Steps
ALTER TABLE ... SET OPTIONS ('fileindex.rangebitmap.<col>.chunk-size'='2g') then write a data file with the range-bitmap index enabled.
Bug description
RangeBitmapFileIndex's Writer parses the user-facingchunk-sizeoption (per-column:fileindex.rangebitmap.<col>.chunk-size) with(int) MemorySize.parse(...).getBytes(). Any value aboveInteger.MAX_VALUE— e.g. the legitimate"2g"a user might set to effectively disable chunking — silently narrows to a negative int, and the writer then crashes with an unrelated failure deep inside the first chunk creation.The chunk size becomes an eagerly allocated per-chunk buffer (
FixedLengthChunkdoesByteBuffer.allocate(limitedSerializedSizeInBytes)), so values beyond int range can never work in the current design.Expected behavior
A clear validation error naming the option and the offending value, instead of a silent truncation and a deep crash.
Steps
ALTER TABLE ... SET OPTIONS ('fileindex.rangebitmap.<col>.chunk-size'='2g')then write a data file with the range-bitmap index enabled.