Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
zhztheplayer committed Dec 17, 2021
1 parent ecf6a98 commit 222ce24
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -368,24 +368,20 @@ private void checkParquetReadResult(Schema schema, List<GenericRecord> expected,
try (VectorSchemaRoot vsr = VectorSchemaRoot.create(schema, rootAllocator())) {
VectorLoader loader = new VectorLoader(vsr);
for (ArrowRecordBatch batch : actual) {
try {
assertEquals(fieldCount, batch.getNodes().size());
loader.load(batch);
int batchRowCount = vsr.getRowCount();
for (int i = 0; i < fieldCount; i++) {
FieldVector vector = vsr.getVector(i);
for (int j = 0; j < batchRowCount; j++) {
Object object = vector.getObject(j);
Object expectedObject = expectedRemovable.get(j).get(i);
assertEquals(Objects.toString(expectedObject),
Objects.toString(object));
}
assertEquals(fieldCount, batch.getNodes().size());
loader.load(batch);
int batchRowCount = vsr.getRowCount();
for (int i = 0; i < fieldCount; i++) {
FieldVector vector = vsr.getVector(i);
for (int j = 0; j < batchRowCount; j++) {
Object object = vector.getObject(j);
Object expectedObject = expectedRemovable.get(j).get(i);
assertEquals(Objects.toString(expectedObject),
Objects.toString(object));
}
for (int i = 0; i < batchRowCount; i++) {
expectedRemovable.poll();
}
} finally {
batch.close();
}
for (int i = 0; i < batchRowCount; i++) {
expectedRemovable.poll();
}
}
assertTrue(expectedRemovable.isEmpty());
Expand Down
26 changes: 13 additions & 13 deletions java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -740,19 +740,19 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<compilerArgs combine.children="append">
<arg>-XDcompilePolicy=simple</arg>
<arg>-Xplugin:ErrorProne</arg>
</compilerArgs>
<annotationProcessorPaths combine.children="append">
<path>
<groupId>com.google.errorprone</groupId>
<artifactId>error_prone_core</artifactId>
<version>2.4.0</version>
</path>
</annotationProcessorPaths>
</configuration>
<!-- <configuration>-->
<!-- <compilerArgs combine.children="append">-->
<!-- <arg>-XDcompilePolicy=simple</arg>-->
<!-- <arg>-Xplugin:ErrorProne</arg>-->
<!-- </compilerArgs>-->
<!-- <annotationProcessorPaths combine.children="append">-->
<!-- <path>-->
<!-- <groupId>com.google.errorprone</groupId>-->
<!-- <artifactId>error_prone_core</artifactId>-->
<!-- <version>2.4.0</version>-->
<!-- </path>-->
<!-- </annotationProcessorPaths>-->
<!-- </configuration>-->
</plugin>
</plugins>
</build>
Expand Down

0 comments on commit 222ce24

Please sign in to comment.