You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by gatorsmile <gi...@git.apache.org> on 2016/05/08 16:40:53 UTC

[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

GitHub user gatorsmile opened a pull request:

    https://github.com/apache/spark/pull/12991

    [SPARK-15215] [SQL] Fix Explain Parsing and Output

    #### What changes were proposed in this pull request?
    This PR is to address a few existing issues in Explain:
    - The `Explain` options `LOGICAL | FORMATTED | EXTENDED | CODEGEN` should not be 0 or more match. It should 0 or one match.
    - The option `LOGICAL` is not supported
    - The output of `Explain` contains a weird empty line when the output of analyzed plan is empty. For example:
      ```
      == Parsed Logical Plan ==
      CreateTable CatalogTable(`t`,CatalogTableType(MANAGED),CatalogStorageFormat(None,Some(org.apache.hadoop.mapred.TextInputFormat),Some(org.apache.hadoop.hive.ql.io.  HiveIgnoreKeyTextOutputFormat),None,false,Map()),List(CatalogColumn(col,int,true,None)),List(),List(),List(),-1,,1462725171656,-1,Map(),None,None,None), false
      
      == Analyzed Logical Plan ==
      
      CreateTable CatalogTable(`t`,CatalogTableType(MANAGED),CatalogStorageFormat(None,Some(org.apache.hadoop.mapred.TextInputFormat),Some(org.apache.hadoop.hive.ql.io.  HiveIgnoreKeyTextOutputFormat),None,false,Map()),List(CatalogColumn(col,int,true,None)),List(),List(),List(),-1,,1462725171656,-1,Map(),None,None,None), false
      
      == Optimized Logical Plan ==
      CreateTable CatalogTable(`t`,CatalogTableType(MANAGED),CatalogStorageFormat(None,Some(org.apache.hadoop.mapred.TextInputFormat),Some(org.apache.hadoop.hive.ql.io.  HiveIgnoreKeyTextOutputFormat),None,false,Map()),List(CatalogColumn(col,int,true,None)),List(),List(),List(),-1,,1462725171656,-1,Map(),None,None,None), false
      ...
      ```
    
    #### How was this patch tested?
    Added and modified a few test cases

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gatorsmile/spark explainCreateTable

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/spark/pull/12991.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #12991
    
----
commit ee7868ead2072b6fa056257694dd6f8b5d15cfed
Author: gatorsmile <ga...@gmail.com>
Date:   2016-05-08T16:23:23Z

    fix.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-218005481
  
    Just updated it  and now I think it is more readable. Let me know if anything is not clear. Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62437307
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -92,7 +92,7 @@ statement
         | CREATE TEMPORARY? FUNCTION qualifiedName AS className=STRING
             (USING resource (',' resource)*)?                              #createFunction
         | DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName              #dropFunction
    -    | EXPLAIN explainOption* statement                                 #explain
    +    | EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN)? statement    #explain
    --- End diff --
    
    **Case 4: Explain with an option Formatted:**
    
    ```
    hive> explain formatted select * from t1;
    OK
    {"STAGE PLANS":{"Stage-0":{"Fetch Operator":{"limit:":"-1","Processor Tree:":{"TableScan":{"alias:":"t1","children":{"Select Operator":{"expressions:":"col (type: int)","outputColumnNames:":["_col0"],"children":{"ListSink":{}},"Statistics:":"Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE"}},"Statistics:":"Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE"}}}}},"STAGE DEPENDENCIES":{"Stage-0":{"ROOT STAGE":"TRUE"}}}
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-218002783
  
    **[Test build #58170 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/58170/consoleFull)** for PR 12991 at commit [`eed4e1d`](https://github.com/apache/spark/commit/eed4e1dfb776f3e2e3abe810930f7f253eaab208).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62436254
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -92,7 +92,7 @@ statement
         | CREATE TEMPORARY? FUNCTION qualifiedName AS className=STRING
             (USING resource (',' resource)*)?                              #createFunction
         | DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName              #dropFunction
    -    | EXPLAIN explainOption* statement                                 #explain
    +    | EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN)? statement    #explain
    --- End diff --
    
    What does `LOGICAL` actually show?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-218004482
  
    BTW do we need to update the description? Is it still accurate?



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by hvanhovell <gi...@git.apache.org>.
Github user hvanhovell commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217738192
  
    LGTM
    
    cc @rxin should we also add this to 2.0?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/spark/pull/12991


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62437268
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -92,7 +92,7 @@ statement
         | CREATE TEMPORARY? FUNCTION qualifiedName AS className=STRING
             (USING resource (',' resource)*)?                              #createFunction
         | DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName              #dropFunction
    -    | EXPLAIN explainOption* statement                                 #explain
    +    | EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN)? statement    #explain
    --- End diff --
    
    : ) Based on my understanding, it outputs optimized logical plan. https://issues.apache.org/jira/browse/HIVE-4812 Thus, I assume we do not need to support `Explain Logical`, which is already included in our current `Explain Extended`. Let me know if we want to support it. This is an undocumented Hive feature. 
    
    Compared with Hive, we are not following what Hive does. For example, `Explain Extended` only outputs the AST and Physical plan. 
     


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-218003027
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/58170/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217974068
  
    Sure, will submit a separate PR for it.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62553883
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala ---
    @@ -212,8 +212,7 @@ class QueryExecution(val sparkSession: SparkSession, val logical: LogicalPlan) {
         s"""== Parsed Logical Plan ==
            |${stringOrError(logical)}
            |== Analyzed Logical Plan ==
    -       |${stringOrError(output)}
    -       |${stringOrError(analyzed)}
    +       |${Seq(stringOrError(output), stringOrError(analyzed)).filter(_.nonEmpty).mkString("\n")}
    --- End diff --
    
    this is fairly awkward. can you just break them into two statements.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62437280
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -92,7 +92,7 @@ statement
         | CREATE TEMPORARY? FUNCTION qualifiedName AS className=STRING
             (USING resource (',' resource)*)?                              #createFunction
         | DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName              #dropFunction
    -    | EXPLAIN explainOption* statement                                 #explain
    +    | EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN)? statement    #explain
    --- End diff --
    
    FYI, 
    
    **Case 1: Explain without any option:**
    
    ```
    hive> explain select * from t1;
    OK
    STAGE DEPENDENCIES:
      Stage-0 is a root stage
    
    STAGE PLANS:
      Stage: Stage-0
        Fetch Operator
          limit: -1
          Processor Tree:
            TableScan
              alias: t1
              Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
              Select Operator
                expressions: col (type: int)
                outputColumnNames: _col0
                Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                ListSink
    
    Time taken: 0.756 seconds, Fetched: 17 row(s)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217996116
  
    LGTM pending Jenkins.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-218010003
  
    @hvanhovell feel free to merge.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62437296
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -92,7 +92,7 @@ statement
         | CREATE TEMPORARY? FUNCTION qualifiedName AS className=STRING
             (USING resource (',' resource)*)?                              #createFunction
         | DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName              #dropFunction
    -    | EXPLAIN explainOption* statement                                 #explain
    +    | EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN)? statement    #explain
    --- End diff --
    
    **Case 3: Explain with an option Logical:**
    ```
    hive> explain logical select * from t1;
    OK
    ABSTRACT SYNTAX TREE:
      
    TOK_QUERY
       TOK_FROM
          TOK_TABREF
             TOK_TABNAME
                t1
       TOK_INSERT
          TOK_DESTINATION
             TOK_DIR
                TOK_TMP_FILE
          TOK_SELECT
             TOK_SELEXPR
                TOK_ALLCOLREF
    
    
    LOGICAL PLAN:
    t1 
      TableScan (TS_0)
        alias: t1
        Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
        Select Operator (SEL_1)
          expressions: col (type: int)
          outputColumnNames: _col0
          Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
          ListSink (OP_3)
    
    Time taken: 0.041 seconds, Fetched: 27 row(s)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217957735
  
    Looks alright to add.
    
    @gatorsmile can you submit a separate pr to fix the toString for CatalogTableType
    
    It reads really really weird with all the None, Some, Option, List, etc.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217737494
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62563719
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/QueryExecution.scala ---
    @@ -212,8 +212,7 @@ class QueryExecution(val sparkSession: SparkSession, val logical: LogicalPlan) {
         s"""== Parsed Logical Plan ==
            |${stringOrError(logical)}
            |== Analyzed Logical Plan ==
    -       |${stringOrError(output)}
    -       |${stringOrError(analyzed)}
    +       |${Seq(stringOrError(output), stringOrError(analyzed)).filter(_.nonEmpty).mkString("\n")}
    --- End diff --
    
    Let me break them now. Thanks!



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217737497
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/58106/
    Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217980678
  
    **[Test build #58170 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/58170/consoleFull)** for PR 12991 at commit [`eed4e1d`](https://github.com/apache/spark/commit/eed4e1dfb776f3e2e3abe810930f7f253eaab208).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217737648
  
    cc @hvanhovell Could you please review this? Thanks!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by rxin <gi...@git.apache.org>.
Github user rxin commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217957882
  
    And of course the timestamp 1462725171656


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217731735
  
    **[Test build #58106 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/58106/consoleFull)** for PR 12991 at commit [`ee7868e`](https://github.com/apache/spark/commit/ee7868ead2072b6fa056257694dd6f8b5d15cfed).


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by gatorsmile <gi...@git.apache.org>.
Github user gatorsmile commented on a diff in the pull request:

    https://github.com/apache/spark/pull/12991#discussion_r62437290
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/SqlBase.g4 ---
    @@ -92,7 +92,7 @@ statement
         | CREATE TEMPORARY? FUNCTION qualifiedName AS className=STRING
             (USING resource (',' resource)*)?                              #createFunction
         | DROP TEMPORARY? FUNCTION (IF EXISTS)? qualifiedName              #dropFunction
    -    | EXPLAIN explainOption* statement                                 #explain
    +    | EXPLAIN (LOGICAL | FORMATTED | EXTENDED | CODEGEN)? statement    #explain
    --- End diff --
    
    **Case 2: Explain with an option Extended:**
    
    ```
    hive> explain extended select * from t1;
    OK
    ABSTRACT SYNTAX TREE:
      
    TOK_QUERY
       TOK_FROM
          TOK_TABREF
             TOK_TABNAME
                t1
       TOK_INSERT
          TOK_DESTINATION
             TOK_DIR
                TOK_TMP_FILE
          TOK_SELECT
             TOK_SELEXPR
                TOK_ALLCOLREF
    
    
    STAGE DEPENDENCIES:
      Stage-0 is a root stage
    
    STAGE PLANS:
      Stage: Stage-0
        Fetch Operator
          limit: -1
          Processor Tree:
            TableScan
              alias: t1
              Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
              GatherStats: false
              Select Operator
                expressions: col (type: int)
                outputColumnNames: _col0
                Statistics: Num rows: 1 Data size: 0 Basic stats: PARTIAL Column stats: NONE
                ListSink
    
    Time taken: 0.039 seconds, Fetched: 34 row(s)
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by AmplabJenkins <gi...@git.apache.org>.
Github user AmplabJenkins commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-218003026
  
    Merged build finished. Test PASSed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


[GitHub] spark pull request: [SPARK-15215] [SQL] Fix Explain Parsing and Ou...

Posted by SparkQA <gi...@git.apache.org>.
Github user SparkQA commented on the pull request:

    https://github.com/apache/spark/pull/12991#issuecomment-217737442
  
    **[Test build #58106 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/58106/consoleFull)** for PR 12991 at commit [`ee7868e`](https://github.com/apache/spark/commit/ee7868ead2072b6fa056257694dd6f8b5d15cfed).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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