gengliangwang commented on pull request #35936:
URL: https://github.com/apache/spark/pull/35936#issuecomment-1076393568


   Marking this PR as WIP for now. I am thinking about the following two 
approaches:
   * Extend Origin(this PR): Extend and keep track of the user query text in 
Expression.origin and show it in the runtime error message.  Currently,  
Expression.origin contains only the starting line number and position.
   Example error message:
   == SQL ==
   select cast('a' as int)
   --------^^^^^^^^^^^^^
   
   * Use sql() + Origin: Show Expression.sql and Expression.orgin(starting line 
number + position) in the runtime error message directly. Both APIs exist for 
years and they are well maintained.
   Example error message:
   == SQL(line 1, pos 7) ==
   cast('a' as int)
   
   


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