rdblue commented on issue #26214: [SPARK-29558][SQL] ResolveTables and 
ResolveRelations should be order-insensitive
URL: https://github.com/apache/spark/pull/26214#issuecomment-546536874
 
 
   I think we're clear on how resolution in v1 works. Where we disagree is how 
resolution _should_ work.
   
   Because we want to be careful not to break any existing behavior, we avoid 
making significant changes to `ResolveRelations` if possible. The solution to 
this problem I added to #25955 doesn't modify the rule, so we have options 
here. I think it's a good idea to consider a solution that calls 
`ResolveTables` from `ResolveRelations`, but I think it is the wrong approach 
to make significant changes and mix the two rules together by rewriting 
`ResolveRelations` as this PR originally did.
   
   Longer term, I think it's a bad idea to keep `ResolveRelations` around. I 
understand how it works, and I think that resolution should resolve tables and 
views separately. View resolution is delicate because you have to use the 
context of the view (like the current database) and I think it makes sense to 
keep it separate. Also, using recursive functions instead of running the same 
rule multiple times makes this over-complicated and harder to maintain. I think 
it's worth fixing this when we add views from v2 catalogs, and until then 
making as few changes to `ResolveRelations` as possible.

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to