shardulm94 commented on a change in pull request #1207:
URL: https://github.com/apache/iceberg/pull/1207#discussion_r455402002
##########
File path:
spark/src/main/java/org/apache/iceberg/spark/data/vectorized/VectorizedSparkOrcReaders.java
##########
@@ -378,16 +395,20 @@ private StructConverter(Types.StructType structType,
List<Converter> fieldConver
}
@Override
- public ColumnVector
convert(org.apache.orc.storage.ql.exec.vector.ColumnVector vector, int
batchSize) {
+ public ColumnVector
convert(org.apache.orc.storage.ql.exec.vector.ColumnVector vector, int
batchSize,
+ long batchOffsetInFile) {
StructColumnVector structVector = (StructColumnVector) vector;
List<Types.NestedField> fields = structType.fields();
List<ColumnVector> fieldVectors =
Lists.newArrayListWithExpectedSize(fields.size());
for (int pos = 0, vectorIndex = 0; pos < fields.size(); pos += 1) {
Types.NestedField field = fields.get(pos);
if (idToConstant.containsKey(field.fieldId())) {
fieldVectors.add(new ConstantColumnVector(field.type(), batchSize,
idToConstant.get(field.fieldId())));
+ } else if (field.equals(MetadataColumns.ROW_POSITION)) {
Review comment:
I am checking the current field with the ROW_POSITION field defined in
MetadataColumns, we can probably check just the field ID though.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]