Skip to content

Commit

Permalink
Fix compile error; format source code
Browse files Browse the repository at this point in the history
  • Loading branch information
slessard committed Sep 9, 2024
1 parent 83913a0 commit e2b428e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,12 @@ public ConstantVectorHolder(int numRows) {
}

public ConstantVectorHolder(Types.NestedField icebergField, int numRows, T constantValue) {
super(new NullVector(icebergField.name(), numRows), icebergField, new NullabilityHolder(numRows));
super(
new NullVector(icebergField.name(), numRows),
icebergField,
new NullabilityHolder(numRows));
this.numRows = numRows;
this.constantValue = constantValue;
this.vector = new NullVector(icebergField.name(), numRows);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,12 @@ public void testReadColumnThatDoesNotExistInParquetSchema() throws Exception {
tables = new HadoopTables();

List<Field> expectedFields =
ImmutableList.of(
new Field("a", new FieldType(false, MinorType.INT.getType(), null), null),
new Field("b", new FieldType(true, MinorType.INT.getType(), null), null),
new Field("z", new FieldType(true, MinorType.INT.getType(), null), null));
org.apache.arrow.vector.types.pojo.Schema expectedSchema = new org.apache.arrow.vector.types.pojo.Schema(expectedFields);
ImmutableList.of(
new Field("a", new FieldType(false, MinorType.INT.getType(), null), null),
new Field("b", new FieldType(true, MinorType.INT.getType(), null), null),
new Field("z", new FieldType(true, MinorType.INT.getType(), null), null));
org.apache.arrow.vector.types.pojo.Schema expectedSchema =
new org.apache.arrow.vector.types.pojo.Schema(expectedFields);

Schema schema =
new Schema(
Expand Down Expand Up @@ -350,12 +351,12 @@ public void testReadColumnThatDoesNotExistInParquetSchema() throws Exception {
rowIndex += 1;
}
}

// Read the data and verify that the returned Arrow VectorSchemaRoots match expected rows.
Set<String> columnSet = ImmutableSet.copyOf(columns);
int rowIndex1 = 0;
int totalRows = 0;
try (VectorizedTableScanIterable itr =
new VectorizedTableScanIterable(scan, 1, false)) {
try (VectorizedTableScanIterable itr = new VectorizedTableScanIterable(scan, 1, false)) {
for (ColumnarBatch batch : itr) {
List<GenericRecord> expectedRows = rowsWritten.subList(rowIndex1, rowIndex1 + 1);
VectorSchemaRoot root = batch.createVectorSchemaRootFromVectors();
Expand Down

0 comments on commit e2b428e

Please sign in to comment.