dtenedor opened a new pull request, #44302: URL: https://github.com/apache/spark/pull/44302
### What changes were proposed in this pull request? This PR fixes a bug when querying from table after changing defaults: ``` drop table if exists t; create table t(i int, s string default 'def') using parquet; insert into t select 1, default; alter table t alter column s drop default; insert into t select 2, default; select * from t; -- Removing this line changes the following results! alter table t alter column s set default 'mno'; insert into t select 3, default; select * from t; ``` The bug is related to the relation cache, and the fix involves adding a manual refresh to the cache to make sure we use the right table schema. ### Why are the changes needed? This PR fixes a correctness bug. ### Does this PR introduce _any_ user-facing change? Yes, see above. ### How was this patch tested? This PR adds test coverage. ### Was this patch authored or co-authored using generative AI tooling? No. -- 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]
