Guosmilesmile commented on code in PR #15776:
URL: https://github.com/apache/iceberg/pull/15776#discussion_r3196426694
##########
orc/src/main/java/org/apache/iceberg/orc/OrcValueReaders.java:
##########
@@ -135,12 +138,24 @@ public byte[] nonNullRead(ColumnVector vector, int row) {
public abstract static class StructReader<T> implements OrcValueReader<T> {
private final OrcValueReader<?>[] readers;
private final boolean[] isConstantOrMetadataField;
-
+ private final int[] fieldVectorIndex;
+
+ /**
+ * @param readers readers for each field
+ * @param struct struct type
+ * @param idToConstant constant values by field id
+ * @deprecated Use {@link #StructReader(TypeDescription, List,
Types.StructType, Map)} instead.
+ * This constructor uses position-based binding which may cause field
misalignment in MOR
+ * scenarios. This doesn't work lineage scenarios.
+ */
+ @Deprecated
protected StructReader(
List<OrcValueReader<?>> readers, Types.StructType struct, Map<Integer,
?> idToConstant) {
List<Types.NestedField> fields = struct.fields();
this.readers = new OrcValueReader[fields.size()];
this.isConstantOrMetadataField = new boolean[fields.size()];
+ this.fieldVectorIndex = null;
Review Comment:
Thanks for the new name suggestion. I've also added a comment for it.
--
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]