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/03/24 19:40:05 UTC

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

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



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