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/03/27 09:58:40 UTC

[GitHub] spark pull request: [SPARK-14182] [SQL] Parse DDL Command: Alter V...

GitHub user gatorsmile opened a pull request:

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

    [SPARK-14182] [SQL] Parse DDL Command: Alter View

    #### What changes were proposed in this pull request?
    This PR is to provide native parsing support for DDL commands: `Alter View`. Since its AST trees are highly similar to `Alter Table`. Thus, both implementation are integrated into the same one.
    
    Based on the Hive DDL document:
    https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL and https://cwiki.apache.org/confluence/display/Hive/PartitionedViews
    
    ##### 1. ALTER VIEW RENAME
    **Syntax:**
    ```SQL
    ALTER VIEW view_name RENAME TO new_view_name
    ```
     - to change the name of a view to a different name
    
    ##### 2. ALTER VIEW SET TBLPROPERTIES
    **Syntax:**
    ```SQL
    ALTER VIEW view_name SET TBLPROPERTIES ('comment' = new_comment);
    ```
     - to add metadata to a view
    
    ##### 3. ALTER VIEW UNSET TBLPROPERTIES
    **Syntax:**
    ```SQL
    ALTER VIEW view_name UNSET TBLPROPERTIES [IF EXISTS] ('comment', 'key')
    ```
     - to remove metadata from a view
    
    ##### 4. ALTER VIEW ADD PARTITION
    **Syntax:**
    ```SQL
    ALTER VIEW view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
    ```
     - to add the partitioning metadata for a view.
     - the syntax of partition spec in `ALTER VIEW` is identical to `ALTER TABLE`, **EXCEPT** that it is **ILLEGAL** to specify a `LOCATION` clause.
    
    ##### 5. ALTER VIEW DROP PARTITION
    **Syntax:**
    ```SQL
    ALTER VIEW view_name DROP [IF EXISTS] PARTITION spec1[, PARTITION spec2, ...]
    ```
     - to drop the related partition metadata for a view.
    
    #### How was this patch tested?
    Added the related test cases to `DDLCommandSuite`

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

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

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

    https://github.com/apache/spark/pull/11987.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 #11987
    
----
commit b1ffb0d2dfc4676f0a35fe6a3a197179a96dc138
Author: gatorsmile <ga...@gmail.com>
Date:   2016-03-27T05:58:44Z

    native parsing support for alter view.

commit ea44a9f1d90420d03e93d918fdbbe7fbf4128170
Author: gatorsmile <ga...@gmail.com>
Date:   2016-03-27T06:02:28Z

    Merge remote-tracking branch 'upstream/master' into parseAlterView

commit 3b7b41b1c4b33e4ec721131f5578ddbfc0b84035
Author: gatorsmile <ga...@gmail.com>
Date:   2016-03-27T07:21:24Z

    added comments and fixed bugs.

commit 7322fb1a5062e841538fea864116c961c1daf3ac
Author: gatorsmile <ga...@gmail.com>
Date:   2016-03-27T07:32:06Z

    update comments.

----


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58016351
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
    @@ -253,6 +256,12 @@ case class AlterTableSkewedLocation(
         skewedMap: Map[String, String])(sql: String)
       extends NativeDDLCommand(sql) with Logging
     
    +/**
    + * Add Partition in ALTER TABLE/VIEW: add the table/view partitions.
    + * 'partitionSpecsAndLocs': the syntax of ALTER VIEW is identical to ALTER TABLE,
    + * EXCEPT that it is ILLEGAL to specify a LOCATION clause.
    + * An error message will be issued if the partition exists, unless 'ifNotExists' is false.
    --- End diff --
    
    unless 'ifNotExists' is false.  -> unless 'ifNotExists' is 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203970490
  
    LGTM


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204018880
  
    **[Test build #54644 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54644/consoleFull)** for PR 11987 at commit [`dd1aa23`](https://github.com/apache/spark/commit/dd1aa2358b9a4a8fb2c9b3955d6e08d40e9505bc).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57642548
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
    @@ -106,17 +105,20 @@ case class DropFunction(
         isTemp: Boolean)(sql: String)
       extends NativeDDLCommand(sql) with Logging
     
    -case class AlterTableRename(
    +/** Rename in ALTER TABLE/VIEW: change the name of a table/view to a different name. */
    +case class AlterTableAlterViewRename(
    --- End diff --
    
    `AlterTableAlterView*` is a bit contrived. Views are special tables in our backend, lets just call it `AlterTable*`?


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202687275
  
    I just merged https://github.com/apache/spark/pull/12015
    
    Can you update to use the new ANTLR4 parser instead? We are going to remove the ANTLR3 one in the next day or two. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57957119
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -102,6 +102,15 @@ statement
             (PARTITIONED ON identifierList)?
             (TBLPROPERTIES tablePropertyList)? AS query                    #createView
         | ALTER VIEW tableIdentifier AS? query                             #alterViewQuery
    +    | ALTER VIEW from=tableIdentifier AS? RENAME TO to=tableIdentifier #renameView
    --- End diff --
    
    Great! Will do the change. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57792823
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/AlterTableAlterViewCommandParser.scala ---
    @@ -29,22 +29,26 @@ import org.apache.spark.sql.types.StructType
     
     
     /**
    - * Helper object to parse alter table commands.
    + * Helper object to parse alter table or alter view commands.
      */
    -object AlterTableCommandParser {
    +object AlterTableAlterViewCommandParser {
    --- End diff --
    
    I see. Thank you for letting me know it. 
    
    Will first do the change. Then, update it if necessary. 


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203793600
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203793602
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54598/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57955099
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -102,6 +102,15 @@ statement
             (PARTITIONED ON identifierList)?
             (TBLPROPERTIES tablePropertyList)? AS query                    #createView
         | ALTER VIEW tableIdentifier AS? query                             #alterViewQuery
    +    | ALTER VIEW from=tableIdentifier AS? RENAME TO to=tableIdentifier #renameView
    --- End diff --
    
    Fine, I will combine them for `renameView`, `setViewProperties`, `unsetViewProperties`. 
    
    I still want to keep `addViewPartition` and `dropViewPartitions`. These two have different syntax. Different from Alter Table, `addViewPartition` is unable to accept the `location` clauses; `dropViewPartitions` is unable to accept `PURGE`. 
    
    I am wondering if that makes sense? 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203794945
  
    @andrewor14 @rxin Based on your comments, the latest commits removed all the changes on the ANTLR3 codes, which will be removed soon. Now, the only changes in this PR are against ANTLR4. 
    
    @hvanhovell  @viirya Please check if the changes on Parser is clean and clear. 
    
    Thank you! : )


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203750876
  
    **[Test build #54592 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54592/consoleFull)** for PR 11987 at commit [`38ea348`](https://github.com/apache/spark/commit/38ea348cab7ffcf9a107bb56fb905bab7a6f2d00).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203772943
  
    **[Test build #54592 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54592/consoleFull)** for PR 11987 at commit [`38ea348`](https://github.com/apache/spark/commit/38ea348cab7ffcf9a107bb56fb905bab7a6f2d00).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202556372
  
    @yhuai @andrewor14 @viirya Could you please review the code changes for this PR? 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58062792
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -510,16 +513,22 @@ class SparkSqlAstBuilder extends AstBuilder {
        * For example:
        * {{{
        *   ALTER TABLE table ADD [IF NOT EXISTS] PARTITION spec [LOCATION 'loc1']
    +   *   ALTER VIEW view ADD [IF NOT EXISTS] PARTITION spec
        * }}}
        */
       override def visitAddTablePartition(
           ctx: AddTablePartitionContext): LogicalPlan = withOrigin(ctx) {
         // Create partition spec to location mapping.
    -    val specsAndLocs = ctx.partitionSpecLocation.asScala.map {
    -      splCtx =>
    -        val spec = visitNonOptionalPartitionSpec(splCtx.partitionSpec)
    -        val location = Option(splCtx.locationSpec).map(visitLocationSpec)
    -        spec -> location
    +    val specsAndLocs = if (ctx.partitionSpecLocation.isEmpty) {
    --- End diff --
    
    Minor: I slightly prefer checking if `partitionSpec` is non empty. This is effectively the same, since they are mutally exclusive. 


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202028247
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57642753
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala ---
    @@ -389,21 +415,61 @@ class DDLCommandSuite extends PlanTest {
         comparePlans(parsed2, expected2)
       }
     
    +  // ALTER TABLE view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
       test("alter table: add partition") {
    -    val sql =
    +    val sql1 =
           """
            |ALTER TABLE table_name ADD IF NOT EXISTS PARTITION
            |(dt='2008-08-08', country='us') LOCATION 'location1' PARTITION
            |(dt='2009-09-09', country='uk')
           """.stripMargin
    -    val parsed = parser.parsePlan(sql)
    -    val expected = AlterTableAddPartition(
    +    val sql2 = "ALTER TABLE table_name ADD PARTITION (dt='2008-08-08') LOCATION 'loc'"
    +
    +    val parsed1 = parser.parsePlan(sql1)
    +    val parsed2 = parser.parsePlan(sql2)
    +
    +    val expected1 = AlterTableAlterViewAddPartition(
           TableIdentifier("table_name", None),
           Seq(
             (Map("dt" -> "2008-08-08", "country" -> "us"), Some("location1")),
             (Map("dt" -> "2009-09-09", "country" -> "uk"), None)),
    -      ifNotExists = true)(sql)
    -    comparePlans(parsed, expected)
    +      ifNotExists = true)(sql1)
    +    val expected2 = AlterTableAlterViewAddPartition(
    +      TableIdentifier("table_name", None),
    +      Seq((Map("dt" -> "2008-08-08"), Some("loc"))),
    +      ifNotExists = false)(sql2)
    +
    +    comparePlans(parsed1, expected1)
    +    comparePlans(parsed2, expected2)
    +  }
    +
    +  // ALTER VIEW view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
    +  // Location clause is not allowed.
    +  test("alter view: add partition") {
    +    val sql1 =
    +      """
    +        |ALTER VIEW view_name ADD IF NOT EXISTS PARTITION
    +        |(dt='2008-08-08', country='us') PARTITION
    --- End diff --
    
    HiveQl allows us to use any constant on the right hand side of a partition value. Could you add a test for any other than a string?


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203984634
  
    Merged build finished. Test FAILed.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203956800
  
    **[Test build #54628 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54628/consoleFull)** for PR 11987 at commit [`cdb8cc0`](https://github.com/apache/spark/commit/cdb8cc0e0151f29d8436cfc693a10f92bbfde9cd).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204008841
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54634/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204062440
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54644/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202028250
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54286/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203975432
  
    **[Test build #54634 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54634/consoleFull)** for PR 11987 at commit [`315de90`](https://github.com/apache/spark/commit/315de9097d7f8b04e62afa735ebcefa61ad17031).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57792101
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/AlterTableAlterViewCommandParser.scala ---
    @@ -29,22 +29,26 @@ import org.apache.spark.sql.types.StructType
     
     
     /**
    - * Helper object to parse alter table commands.
    + * Helper object to parse alter table or alter view commands.
      */
    -object AlterTableCommandParser {
    +object AlterTableAlterViewCommandParser {
    --- End diff --
    
    actually, I believe this will be removed in the near future. All changes you make here should be in SparkSqlParser.scala instead.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58059334
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
    @@ -253,6 +256,12 @@ case class AlterTableSkewedLocation(
         skewedMap: Map[String, String])(sql: String)
       extends NativeDDLCommand(sql) with Logging
     
    +/**
    + * Add Partition in ALTER TABLE/VIEW: add the table/view partitions.
    + * 'partitionSpecsAndLocs': the syntax of ALTER VIEW is identical to ALTER TABLE,
    + * EXCEPT that it is ILLEGAL to specify a LOCATION clause.
    + * An error message will be issued if the partition exists, unless 'ifNotExists' is false.
    --- End diff --
    
    Thanks, fixed.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203772332
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57679214
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
    @@ -106,17 +105,20 @@ case class DropFunction(
         isTemp: Boolean)(sql: String)
       extends NativeDDLCommand(sql) with Logging
     
    -case class AlterTableRename(
    +/** Rename in ALTER TABLE/VIEW: change the name of a table/view to a different name. */
    +case class AlterTableAlterViewRename(
    --- End diff --
    
    Sure, will rename them. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203771892
  
    **[Test build #54594 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54594/consoleFull)** for PR 11987 at commit [`dd34529`](https://github.com/apache/spark/commit/dd34529ea4f15b627cdf4dd921bf5a726d543b6d).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204070716
  
    @andrewor14 @yhuai Could you also check if the latest version is fine? 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57791722
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/AlterTableAlterViewCommandParser.scala ---
    @@ -29,22 +29,26 @@ import org.apache.spark.sql.types.StructType
     
     
     /**
    - * Helper object to parse alter table commands.
    + * Helper object to parse alter table or alter view commands.
      */
    -object AlterTableCommandParser {
    +object AlterTableAlterViewCommandParser {
    --- End diff --
    
    Sure, Will change it back. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202013658
  
    **[Test build #54286 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54286/consoleFull)** for PR 11987 at commit [`7322fb1`](https://github.com/apache/spark/commit/7322fb1a5062e841538fea864116c961c1daf3ac).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203965085
  
    One minor comment. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57679227
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala ---
    @@ -249,8 +249,9 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends Cataly
     
             DropFunction(dbName, funcName, ifExists.isDefined, temp.isDefined)(node.source)
     
    -      case Token("TOK_ALTERTABLE", alterTableArgs) =>
    -        AlterTableCommandParser.parse(node)
    +      case Token(fieldName, alterTableArgs)
    --- End diff --
    
    Sure, will do. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204079288
  
    LGTM merging into master, thanks @gatorsmile and reviewers!


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57679267
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala ---
    @@ -389,21 +415,61 @@ class DDLCommandSuite extends PlanTest {
         comparePlans(parsed2, expected2)
       }
     
    +  // ALTER TABLE view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
       test("alter table: add partition") {
    -    val sql =
    +    val sql1 =
           """
            |ALTER TABLE table_name ADD IF NOT EXISTS PARTITION
            |(dt='2008-08-08', country='us') LOCATION 'location1' PARTITION
            |(dt='2009-09-09', country='uk')
           """.stripMargin
    -    val parsed = parser.parsePlan(sql)
    -    val expected = AlterTableAddPartition(
    +    val sql2 = "ALTER TABLE table_name ADD PARTITION (dt='2008-08-08') LOCATION 'loc'"
    +
    +    val parsed1 = parser.parsePlan(sql1)
    +    val parsed2 = parser.parsePlan(sql2)
    +
    +    val expected1 = AlterTableAlterViewAddPartition(
           TableIdentifier("table_name", None),
           Seq(
             (Map("dt" -> "2008-08-08", "country" -> "us"), Some("location1")),
             (Map("dt" -> "2009-09-09", "country" -> "uk"), None)),
    -      ifNotExists = true)(sql)
    -    comparePlans(parsed, expected)
    +      ifNotExists = true)(sql1)
    +    val expected2 = AlterTableAlterViewAddPartition(
    +      TableIdentifier("table_name", None),
    +      Seq((Map("dt" -> "2008-08-08"), Some("loc"))),
    +      ifNotExists = false)(sql2)
    +
    +    comparePlans(parsed1, expected1)
    +    comparePlans(parsed2, expected2)
    +  }
    +
    +  // ALTER VIEW view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
    +  // Location clause is not allowed.
    +  test("alter view: add partition") {
    +    val sql1 =
    +      """
    +        |ALTER VIEW view_name ADD IF NOT EXISTS PARTITION
    +        |(dt='2008-08-08', country='us') PARTITION
    --- End diff --
    
    Sure, will do it. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203492992
  
    **[Test build #54528 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54528/consoleFull)** for PR 11987 at commit [`f379636`](https://github.com/apache/spark/commit/f379636ed28e5fe78af44dfdb4d3821dc6c964af).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57946641
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -102,6 +102,15 @@ statement
             (PARTITIONED ON identifierList)?
             (TBLPROPERTIES tablePropertyList)? AS query                    #createView
         | ALTER VIEW tableIdentifier AS? query                             #alterViewQuery
    +    | ALTER VIEW from=tableIdentifier AS? RENAME TO to=tableIdentifier #renameView
    --- End diff --
    
    I don't think we need a dedicated label (i.e. `#renameView`) for this, we can just re-use `#renameTable` for this. That way you don't have to add any code to `SparkSqlParser`. The same goes for all these commands.
    
    We can also integrate this with the `ALTER TABLE ...` equivalent rules (i.e. `ALTER (TABLE|VIEW) ...`. But this is a bit messier, and I'll leave that to you.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58001378
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -74,12 +75,16 @@ statement
             SET SKEWED LOCATION skewedLocationList                         #setTableSkewLocations
         | ALTER TABLE tableIdentifier ADD (IF NOT EXISTS)?
             partitionSpecLocation+                                         #addTablePartition
    +    | ALTER VIEW tableIdentifier ADD (IF NOT EXISTS)?
    +        partitionSpec+                                                 #addViewPartition
    --- End diff --
    
    re-use label?


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57642374
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkQl.scala ---
    @@ -249,8 +249,9 @@ private[sql] class SparkQl(conf: ParserConf = SimpleParserConf()) extends Cataly
     
             DropFunction(dbName, funcName, ifExists.isDefined, temp.isDefined)(node.source)
     
    -      case Token("TOK_ALTERTABLE", alterTableArgs) =>
    -        AlterTableCommandParser.parse(node)
    +      case Token(fieldName, alterTableArgs)
    --- End diff --
    
    You can also use: `Token("TOK_ALTERTABLE" | "TOK_ALTERVIEW", alterTableArgs) =>`


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203540854
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204008836
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203540857
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54528/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58001379
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -74,12 +75,16 @@ statement
             SET SKEWED LOCATION skewedLocationList                         #setTableSkewLocations
         | ALTER TABLE tableIdentifier ADD (IF NOT EXISTS)?
             partitionSpecLocation+                                         #addTablePartition
    +    | ALTER VIEW tableIdentifier ADD (IF NOT EXISTS)?
    +        partitionSpec+                                                 #addViewPartition
    --- End diff --
    
    @hvanhovell Still trying to combine `addViewPartition` and `addTablePartition`. Will keep you posted. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203773703
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203751599
  
    **[Test build #54594 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54594/consoleFull)** for PR 11987 at commit [`dd34529`](https://github.com/apache/spark/commit/dd34529ea4f15b627cdf4dd921bf5a726d543b6d).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202744066
  
    Yeah, will use the new ANTLR4. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203984404
  
    **[Test build #54628 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54628/consoleFull)** for PR 11987 at commit [`cdb8cc0`](https://github.com/apache/spark/commit/cdb8cc0e0151f29d8436cfc693a10f92bbfde9cd).
     * This patch **fails Spark unit 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203793109
  
    **[Test build #54598 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54598/consoleFull)** for PR 11987 at commit [`48aec92`](https://github.com/apache/spark/commit/48aec92480ec59ed4a965941d56126d9222cb853).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203772338
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54594/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204008475
  
    **[Test build #54634 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54634/consoleFull)** for PR 11987 at commit [`315de90`](https://github.com/apache/spark/commit/315de9097d7f8b04e62afa735ebcefa61ad17031).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58001426
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -74,12 +75,16 @@ statement
             SET SKEWED LOCATION skewedLocationList                         #setTableSkewLocations
         | ALTER TABLE tableIdentifier ADD (IF NOT EXISTS)?
             partitionSpecLocation+                                         #addTablePartition
    +    | ALTER VIEW tableIdentifier ADD (IF NOT EXISTS)?
    +        partitionSpec+                                                 #addViewPartition
    --- End diff --
    
    @viirya Yeah, I am doing it now.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204062050
  
    **[Test build #54644 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54644/consoleFull)** for PR 11987 at commit [`dd1aa23`](https://github.com/apache/spark/commit/dd1aa2358b9a4a8fb2c9b3955d6e08d40e9505bc).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-204062439
  
    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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57791427
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/AlterTableAlterViewCommandParser.scala ---
    @@ -29,22 +29,26 @@ import org.apache.spark.sql.types.StructType
     
     
     /**
    - * Helper object to parse alter table commands.
    + * Helper object to parse alter table or alter view commands.
      */
    -object AlterTableCommandParser {
    +object AlterTableAlterViewCommandParser {
    --- End diff --
    
    I'd just keep this `AlterTableCommandParser`.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203764881
  
    **[Test build #54598 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54598/consoleFull)** for PR 11987 at commit [`48aec92`](https://github.com/apache/spark/commit/48aec92480ec59ed4a965941d56126d9222cb853).


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58063615
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/SparkSqlParser.scala ---
    @@ -510,16 +513,22 @@ class SparkSqlAstBuilder extends AstBuilder {
        * For example:
        * {{{
        *   ALTER TABLE table ADD [IF NOT EXISTS] PARTITION spec [LOCATION 'loc1']
    +   *   ALTER VIEW view ADD [IF NOT EXISTS] PARTITION spec
        * }}}
        */
       override def visitAddTablePartition(
           ctx: AddTablePartitionContext): LogicalPlan = withOrigin(ctx) {
         // Create partition spec to location mapping.
    -    val specsAndLocs = ctx.partitionSpecLocation.asScala.map {
    -      splCtx =>
    -        val spec = visitNonOptionalPartitionSpec(splCtx.partitionSpec)
    -        val location = Option(splCtx.locationSpec).map(visitLocationSpec)
    -        spec -> location
    +    val specsAndLocs = if (ctx.partitionSpecLocation.isEmpty) {
    --- End diff --
    
    Sure, I can make a quick change. 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202601642
  
    @gatorsmile this looks pretty solid. Could you take a look at https://github.com/apache/spark/pull/12011 and rebase against that? Let me know if you need some assistance.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57909477
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLCommandSuite.scala ---
    @@ -389,21 +415,61 @@ class DDLCommandSuite extends PlanTest {
         comparePlans(parsed2, expected2)
       }
     
    +  // ALTER TABLE view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
       test("alter table: add partition") {
    -    val sql =
    +    val sql1 =
           """
            |ALTER TABLE table_name ADD IF NOT EXISTS PARTITION
            |(dt='2008-08-08', country='us') LOCATION 'location1' PARTITION
            |(dt='2009-09-09', country='uk')
           """.stripMargin
    -    val parsed = parser.parsePlan(sql)
    -    val expected = AlterTableAddPartition(
    +    val sql2 = "ALTER TABLE table_name ADD PARTITION (dt='2008-08-08') LOCATION 'loc'"
    +
    +    val parsed1 = parser.parsePlan(sql1)
    +    val parsed2 = parser.parsePlan(sql2)
    +
    +    val expected1 = AlterTableAlterViewAddPartition(
           TableIdentifier("table_name", None),
           Seq(
             (Map("dt" -> "2008-08-08", "country" -> "us"), Some("location1")),
             (Map("dt" -> "2009-09-09", "country" -> "uk"), None)),
    -      ifNotExists = true)(sql)
    -    comparePlans(parsed, expected)
    +      ifNotExists = true)(sql1)
    +    val expected2 = AlterTableAlterViewAddPartition(
    +      TableIdentifier("table_name", None),
    +      Seq((Map("dt" -> "2008-08-08"), Some("loc"))),
    +      ifNotExists = false)(sql2)
    +
    +    comparePlans(parsed1, expected1)
    +    comparePlans(parsed2, expected2)
    +  }
    +
    +  // ALTER VIEW view_name ADD [IF NOT EXISTS] PARTITION spec1[, PARTITION spec2, ...]
    +  // Location clause is not allowed.
    +  test("alter view: add partition") {
    +    val sql1 =
    +      """
    +        |ALTER VIEW view_name ADD IF NOT EXISTS PARTITION
    +        |(dt='2008-08-08', country='us') PARTITION
    --- End diff --
    
    Four different constant types are added. 


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-202027840
  
    **[Test build #54286 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54286/consoleFull)** for PR 11987 at commit [`7322fb1`](https://github.com/apache/spark/commit/7322fb1a5062e841538fea864116c961c1daf3ac).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r57956695
  
    --- Diff: sql/catalyst/src/main/antlr4/org/apache/spark/sql/catalyst/parser/ng/SqlBase.g4 ---
    @@ -102,6 +102,15 @@ statement
             (PARTITIONED ON identifierList)?
             (TBLPROPERTIES tablePropertyList)? AS query                    #createView
         | ALTER VIEW tableIdentifier AS? query                             #alterViewQuery
    +    | ALTER VIEW from=tableIdentifier AS? RENAME TO to=tableIdentifier #renameView
    --- End diff --
    
    It does. You can keep the grammar for `addViewPartition` and `dropViewPartitions`, but reuse the labels. The parser will then catch unallowed syntax, and we will duplicate code.


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203773709
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/54592/
    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-14182] [SQL] Parse DDL Command: Alter V...

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

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


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

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


---
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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#issuecomment-203540488
  
    **[Test build #54528 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/54528/consoleFull)** for PR 11987 at commit [`f379636`](https://github.com/apache/spark/commit/f379636ed28e5fe78af44dfdb4d3821dc6c964af).
     * 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-14182] [SQL] Parse DDL Command: Alter V...

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

    https://github.com/apache/spark/pull/11987#discussion_r58016427
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala ---
    @@ -271,6 +280,14 @@ case class AlterTableExchangePartition(
         spec: TablePartitionSpec)(sql: String)
       extends NativeDDLCommand(sql) with Logging
     
    +/**
    + * Drop Partition in ALTER TABLE/VIEW: to drop a particular partition for a table/view.
    + * This removes the data and metadata for this partition.
    + * The data is actually moved to the .Trash/Current directory if Trash is configured,
    + * unless 'purge' is true, but the metadata is completely lost.
    + * An error message will be issued if the partition does not exist, unless 'ifExists' is false.
    --- End diff --
    
    As same as above.


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