Skip to content

Commit

Permalink
[core] Remove useless OrcReaderFactory.computeProjectionMask
Browse files Browse the repository at this point in the history
  • Loading branch information
JingsongLi committed Apr 22, 2024
1 parent 3d28d8f commit c2c0d75
Showing 1 changed file with 0 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -326,26 +326,6 @@ private static Pair<Long, Long> getOffsetAndLengthForSplit(
}
}

/**
* Computes the ORC projection mask of the fields to include from the selected
* fields.rowOrcInputFormat.nextRecord(null).
*
* @return The ORC projection mask.
*/
private static boolean[] computeProjectionMask(TypeDescription schema, int[] selectedFields) {
// mask with all fields of the schema
boolean[] projectionMask = new boolean[schema.getMaximumId() + 1];
// for each selected field
for (int inIdx : selectedFields) {
// set all nested fields of a selected field to true
TypeDescription fieldSchema = schema.getChildren().get(inIdx);
for (int i = fieldSchema.getId(); i <= fieldSchema.getMaximumId(); i++) {
projectionMask[i] = true;
}
}
return projectionMask;
}

public static org.apache.orc.Reader createReader(
org.apache.hadoop.conf.Configuration conf,
FileIO fileIO,
Expand Down

0 comments on commit c2c0d75

Please sign in to comment.