You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/04/18 21:46:43 UTC

[GitHub] [spark] dongjoon-hyun commented on a change in pull request #24385: [SPARK-27480][SQL] Improve `EXPLAIN DESC QUERY` to show the input SQL statement

dongjoon-hyun commented on a change in pull request #24385: [SPARK-27480][SQL] Improve `EXPLAIN DESC QUERY` to show the input SQL statement
URL: https://github.com/apache/spark/pull/24385#discussion_r276845802
 
 

 ##########
 File path: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala
 ##########
 @@ -373,7 +374,11 @@ class SparkSqlAstBuilder(conf: SQLConf) extends AstBuilder(conf) {
    * Create a [[DescribeQueryCommand]] logical command.
    */
   override def visitDescribeQuery(ctx: DescribeQueryContext): LogicalPlan = withOrigin(ctx) {
-    DescribeQueryCommand(visitQuery(ctx.query))
+    val query = ctx.query
+    val startIndex = query.start.getStartIndex
+    val endIndex = query.stop.getStopIndex
+    val interval = new Interval(startIndex, endIndex)
 
 Review comment:
   nit. Can we remove the one-time used variables?
   ```scala
   -    val startIndex = query.start.getStartIndex
   -    val endIndex = query.stop.getStopIndex
   -    val interval = new Interval(startIndex, endIndex)
   +    val interval = new Interval(query.start.getStartIndex, query.stop.getStopIndex)
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org