singhpk234 commented on code in PR #5075:
URL: https://github.com/apache/iceberg/pull/5075#discussion_r906699018
##########
spark/v3.2/spark/src/main/java/org/apache/iceberg/spark/TypeToSparkType.java:
##########
@@ -59,8 +61,11 @@ public DataType struct(Types.StructType struct,
List<DataType> fieldResults) {
for (int i = 0; i < fields.size(); i += 1) {
Types.NestedField field = fields.get(i);
DataType type = fieldResults.get(i);
- StructField sparkField = StructField.apply(
- field.name(), type, field.isOptional(), Metadata.empty());
+ Metadata metadata = Metadata.empty();
+ if (MetadataColumns.isMetadataColumn(field.name())) {
+ metadata = new
MetadataBuilder().putBoolean(MetadataColumns.METADATA_COL_ATTR_KEY,
true).build();
+ }
Review Comment:
makes sense, made it consistent to 3.3 review comments as well.
--
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]