rdsr commented on a change in pull request #1321:
URL: https://github.com/apache/iceberg/pull/1321#discussion_r468993213
##########
File path: core/src/main/java/org/apache/iceberg/avro/PruneColumns.java
##########
@@ -144,16 +144,18 @@ public Schema array(Schema array, Schema element) {
if (selectedIds.contains(keyId) || selectedIds.contains(valueId)) {
return complexMapWithIds(array, keyId, valueId);
} else if (element != null) {
- Schema keyProjection = element.getField("key").schema();
+ Schema.Field keyProjectionField = element.getField("key");
Review comment:
I wonder why we should solve this in a different way. The issue is that
when complex value types are involved for logical maps the key is not
projected. Then why don't we project the key field if the map's value field is
projected?
Would it be better to change the `map` method in `GetProjectedIds` to always
project the `keyField` if `valueResult` is not `null` instead of changing
`PruneColumns`?
What do you guys think @rdblue, @lxynov ?
----------------------------------------------------------------
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]