openinx commented on issue #2738:
URL: https://github.com/apache/iceberg/issues/2738#issuecomment-868349637


   I had a test in spark3: 
   
   ```bash
   CREATE TABLE loc(
       id       LONG NOT NULL,
       location STRUCT<lat:DOUBLE NOT NULL, long:DOUBLE NOT NULL>
   );
   
   INSERT INTO loc VALUES (1, null);
   
   > SELECT * FROM loc;
   1    NULL
   Time taken: 0.374 seconds, Fetched 1 row(s)
   
   > SELECT location.lat FROM loc;
   NULL
   Time taken: 0.22 seconds, Fetched 1 row(s)
   ```
   
   So it will get a `NULL` value when projecting the required `location.lat` 
from optional `location` struct.


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