rzhang10 edited a comment 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 dig into the code of this class you'll find it 
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 
@wmoustafa


-- 
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]

Reply via email to