pitrou commented on code in PR #1291:
URL: https://github.com/apache/parquet-mr/pull/1291#discussion_r1514265839
##########
parquet-hadoop/src/test/java/org/apache/parquet/hadoop/TestInterOpReadByteStreamSplit.java:
##########
@@ -67,7 +72,73 @@ public void testReadFloats() throws IOException {
break;
}
}
- assertTrue(reader.read() == null);
+ assertNull(reader.read());
}
}
+
+ private void compareColumnValues(
+ Path path, int expectRows, String leftCol, String rightCol,
FieldComparator comparator) throws IOException {
+ try (ParquetReader<Group> reader =
+ ParquetReader.builder(new GroupReadSupport(), path).build()) {
+ for (int i = 0; i < expectRows; ++i) {
+ Group group = reader.read();
+ assertNotNull(group);
+ comparator.assertFieldsEqual(group, leftCol, rightCol);
+ }
+ assertNull(reader.read());
+ }
+ }
+
+ @Test
+ public void testReadAllSupportedTypes() throws IOException {
+ Path extendedFile = interop.GetInterOpFile(EXTENDED_FILE, CHANGESET);
+ final int expectRows = 200;
+ compareColumnValues(
+ extendedFile, expectRows, "float_plain", "float_byte_stream_split",
((group, leftCol, rightCol) -> {
+ float leftVal = group.getFloat(leftCol, 0);
+ float rightVal = group.getFloat(rightCol, 0);
+ assertEquals(leftVal, rightVal, 0.0);
+ }));
+ compareColumnValues(
Review Comment:
It appeats this triggers a check failure:
```
Error: Failed to execute goal
com.github.siom79.japicmp:japicmp-maven-plugin:0.18.2:cmp (default) on project
parquet-column: There is at least one incompatibility:
org.apache.parquet.example.data.Group:METHOD_ABSTRACT_ADDED_IN_SUPERCLASS,org.apache.parquet.example.data.GroupValueSource.getObject(int,int):METHOD_ABSTRACT_ADDED_TO_CLASS
-> [Help 1]
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]