abstractdog commented on code in PR #5195: URL: https://github.com/apache/hive/pull/5195#discussion_r1615288791
########## ql/src/test/org/apache/hadoop/hive/ql/io/orc/TestInputOutputFormat.java: ########## @@ -1837,6 +1836,26 @@ public void testProjectedColumnSize() throws Exception { assertEquals(376804, result.getProjectedColumnsUncompressedSize()); } + @Test + public void testAcidProjectedColumnSize() throws Exception { + Path file = new Path(HiveTestUtils.getFileFromClasspath("bucket_00952_0")); + FileSystem fs = FileSystem.getLocal(conf).getRaw(); + + OrcInputFormat.Context context = new OrcInputFormat.Context(conf); + OrcInputFormat.SplitInfo splitInfo = new OrcInputFormat.SplitInfo( + context, fs, fs.getFileStatus(file), null, null, true, new ArrayList<>(), true, null, null); + OrcInputFormat.SplitGenerator splitter = new OrcInputFormat.SplitGenerator(splitInfo, null, true, true); + + List<OrcSplit> results = splitter.call(); + assertEquals(1, results.size()); + + OrcSplit result = results.get(0); + assertEquals(3, result.getStart()); + assertEquals(900, result.getLength()); + assertEquals(1, results.size()); + assertEquals(1246255309, results.get(0).getProjectedColumnsUncompressedSize()); Review Comment: nit: reuse result instead of results.get(0) -- 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: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org