dongjoon-hyun commented on code in PR #1080:
URL: https://github.com/apache/orc/pull/1080#discussion_r843439638
##########
java/core/src/test/org/apache/orc/TestVectorOrcFile.java:
##########
@@ -4384,6 +4384,96 @@ public void testPredicatePushdownWithNan(Version
fileFormat) throws Exception {
assertEquals(0, batch.size);
}
+ @ParameterizedTest
+ @MethodSource("data")
+ public void testPredicatePushdownWithSumOverflow(Version fileFormat) throws
Exception {
+ TypeDescription schema = TypeDescription.createStruct()
+ .addField("double1", TypeDescription.createDouble())
+ .addField("float1", TypeDescription.createFloat());
+
+ Writer writer = OrcFile.createWriter(testFilePath,
+ OrcFile.writerOptions(conf)
+ .setSchema(schema)
+ .stripeSize(400000L)
+ .compress(CompressionKind.NONE)
+ .bufferSize(500)
+ .rowIndexStride(1000)
+ .version(fileFormat));
+ VectorizedRowBatch batch = schema.createRowBatch();
+ batch.ensureSize(3500);
+ batch.size = 3500;
+ batch.cols[0].noNulls = true;
+ batch.cols[1].noNulls = true;
+
+ DoubleColumnVector dbcol = ((DoubleColumnVector) batch.cols[0]);
+ DoubleColumnVector fcol = ((DoubleColumnVector) batch.cols[1]);
+
+ double largeNumber = Double.MAX_VALUE / 2 + Double.MAX_VALUE / 4;
+
+ // Here we are writing 3500 rows of data, with stripeSize set to 400000
+ // and rowIndexStride set to 1000, so 1 stripe will be written,
+ // indexed in 4 strides.
Review Comment:
Thank you for the details.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]