singhpk234 commented on code in PR #8250: URL: https://github.com/apache/iceberg/pull/8250#discussion_r1359495723
########## spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/InternalRowWrapper.java: ########## @@ -71,8 +77,12 @@ public <T> void set(int pos, T value) { row.update(pos, value); } - private static BiFunction<InternalRow, Integer, ?> getter(DataType type) { + private static BiFunction<InternalRow, Integer, ?> getter(Type icebergType, DataType type) { if (type instanceof StringType) { + if (Type.TypeID.UUID == icebergType.typeId()) { Review Comment: can we add a comment here explaining that a StringType may be a UUID-type hence return UUID also should we explicity check the else case saying if it's not StringType either throw UnReachable or Unsupported ops or null accordingly ? ########## spark/v3.3/spark/src/main/java/org/apache/iceberg/spark/source/InternalRowWrapper.java: ########## @@ -40,9 +43,12 @@ class InternalRowWrapper implements StructLike { private InternalRow row = null; @SuppressWarnings("unchecked") - InternalRowWrapper(StructType rowType) { + InternalRowWrapper(StructType rowType, Types.StructType icebergStruct) { Review Comment: should we have a Pre-condition check that icebergStruct.fields().length is equal to types.lenght ? -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org