You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by GitBox <gi...@apache.org> on 2021/04/20 22:15:26 UTC

[GitHub] [iceberg] rzhang10 commented on pull request #2352: make GetProjectedIds able to handle empty struct

rzhang10 commented on pull request #2352:
URL: https://github.com/apache/iceberg/pull/2352#issuecomment-823634268


   @rdblue Hey Ryan, I feel what causes the confusion here is the class `GetProjectedIds` 's name, if you go to this class actually doesn't do field projection, what it does is it tries to get extract all the internal ids from complex types (struct, map, list) out, such that the returned set of ids only maps to primitive type fields. However, the corner case it is missing is exactly the empty struct case, where the struct field itself should be kept. If you take a look at the code, the `GetProjectedIds` only gets used by `TypeUtil.selectNot` function which calls `select()` to really gets the projection, but via another visitor called `PruneColumns`.
   
   So I believe my code is handling the corner case correctly. cc @shardulm94 


-- 
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org