[jira] [Assigned] (SPARK-38616) Keep track of SQL query text in Catalyst TreeNode
[ https://issues.apache.org/jira/browse/SPARK-38616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-38616: Assignee: Gengliang Wang (was: Apache Spark) > Keep track of SQL query text in Catalyst TreeNode > - > > Key: SPARK-38616 > URL: https://issues.apache.org/jira/browse/SPARK-38616 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 3.3.0 >Reporter: Gengliang Wang >Assignee: Gengliang Wang >Priority: Major > > Spark SQL uses the class Origin for tracking the position of each TreeNode in > the SQL query text. When there is a parser error, we can show the position > info in the error message: > {code:java} > > sql("create tabe foo(i int)") > org.apache.spark.sql.catalyst.parser.ParseException: > no viable alternative at input 'create tabe'(line 1, pos 7) > == SQL == > create tabe foo(i int) > ---^^^ {code} > It contains two fields: line and startPosition. This is enough for the parser > since the SQL query text is known. > However, the SQL query text is unknown in the execution phase. One solution > is to include the query text in Origin and show it in the runtime error > message. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org
[jira] [Assigned] (SPARK-38616) Keep track of SQL query text in Catalyst TreeNode
[ https://issues.apache.org/jira/browse/SPARK-38616?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Apache Spark reassigned SPARK-38616: Assignee: Apache Spark (was: Gengliang Wang) > Keep track of SQL query text in Catalyst TreeNode > - > > Key: SPARK-38616 > URL: https://issues.apache.org/jira/browse/SPARK-38616 > Project: Spark > Issue Type: Sub-task > Components: SQL >Affects Versions: 3.3.0 >Reporter: Gengliang Wang >Assignee: Apache Spark >Priority: Major > > Spark SQL uses the class Origin for tracking the position of each TreeNode in > the SQL query text. When there is a parser error, we can show the position > info in the error message: > {code:java} > > sql("create tabe foo(i int)") > org.apache.spark.sql.catalyst.parser.ParseException: > no viable alternative at input 'create tabe'(line 1, pos 7) > == SQL == > create tabe foo(i int) > ---^^^ {code} > It contains two fields: line and startPosition. This is enough for the parser > since the SQL query text is known. > However, the SQL query text is unknown in the execution phase. One solution > is to include the query text in Origin and show it in the runtime error > message. -- This message was sent by Atlassian Jira (v8.20.1#820001) - To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org