anchovYu opened a new pull request, #47813:
URL: https://github.com/apache/spark/pull/47813

   ### What changes were proposed in this pull request?
   This PR allows high-priority analysis errors to be thrown first when a 
low-priority error on LCA (lateral column alias) occurs in the same query. 
   It preempts and stores the LCA error during check analysis. If another error 
happens, it will be thrown first; If not, the LCA error will be thrown at the 
end of the analysis.
   
   ### Why are the changes needed?
   This helps improve the user experience on errors, to provide higher priority 
information and the root cause to users. 
   The test in the PR is one case that UNRESOLVED_COLUMN should be thrown, 
instead of the LCA internal error, which was thrown without the change because 
the segment sits in the CTE definition that is traversed first in CheckAnalysis.
   
   ### Does this PR introduce _any_ user-facing change?
   No.
   
   
   ### How was this patch tested?
   A new test case.
   
   ### 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]

Reply via email to