huaxingao commented on PR #19277:
URL: https://github.com/apache/iceberg/pull/19277#issuecomment-7424078994

   Thanks @nastra for the summary of the Spark 4.1 vs 4.2 behavior, I think 
it's reasonable. I agree we need to fix the correctness issue first, and we can 
discuss name-based binding like 4.2 separately.
   
   Two small things:
   
   1. The comma case from @shihchengwei-lab (`` `price,usd` ``) now also fails 
with the stale-view error, because the saved names no longer line up with the 
schema and the code falls back to the schema names. Could we add a test for it?
   
   2. 2. FYI, one case still reads the wrong column with this PR, for views 
created by Trino:
      - Table `l` has column `x` (value 10), table `r` has column `y` (value 
20).
      - A view `v` is created in Trino as `SELECT * FROM l CROSS JOIN r`. 
`SELECT * FROM v` returns `(10, 20)`.
      - Then `ALTER TABLE l ADD COLUMN y INT AFTER x`.
      - Now `SELECT * FROM v` returns `(10, NULL)` with no error, because the 
view reads the new `l.y` instead of `r.y`. The same view created by Spark fails 
with the stale-view error.
   
   


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

To unsubscribe, e-mail: [email protected]

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