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


   @rzhang10, I think the problem with this is that it will cause more columns 
than needed to be projected. `GetProjectedIds` is used to get the IDs from an 
expected schema. If that expected schema contains an empty struct, then the 
struct itself will be selected. But when we apply that projection to a file 
schema using `select`, the entire struct from the file will be selected. That's 
because you might select a struct using syntax like `SELECT location FROM 
table`, where `location` is `struct<latitude: double, longitude: double>`.
   
   I think there might be a different way to solve the problem you're hitting. 
What method is used to produce the read schema from the expected schema and a 
file schema? I suspect that's what we need to update.


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