You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by jiangxb1987 <gi...@git.apache.org> on 2018/03/08 02:56:57 UTC

[GitHub] spark pull request #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABL...

GitHub user jiangxb1987 opened a pull request:

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

    [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANGE COLUMN COMMENT for external hive table

    ## What changes were proposed in this pull request?
    
    The following query doesn't work as expected:
    ```
    CREATE EXTERNAL TABLE ext_table(a STRING, b INT, c STRING) PARTITIONED BY (d STRING)
    LOCATION 'sql/core/spark-warehouse/ext_table';
    ALTER TABLE ext_table CHANGE a a STRING COMMENT "new comment";
    DESC ext_table;
    ```
    The comment of column `a` is not updated, that's because `HiveExternalCatalog.doAlterTable` ignores table schema changes. To fix the issue, we should call `doAlterTableDataSchema` instead of `doAlterTable`.
    
    ## How was this patch tested?
    
    Updated `DDLSuite.testChangeColumn`.

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

    $ git pull https://github.com/jiangxb1987/spark SPARK-23525-2.2

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

    https://github.com/apache/spark/pull/20768.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 #20768
    
----
commit 49038e6a7115b3a4c20d8360299d3b4531fa109b
Author: Xingbo Jiang <xi...@...>
Date:   2018-03-07T21:51:44Z

    [SPARK-23525][SQL] Support ALTER TABLE CHANGE COLUMN COMMENT for external hive table
    
    ## What changes were proposed in this pull request?
    
    The following query doesn't work as expected:
    ```
    CREATE EXTERNAL TABLE ext_table(a STRING, b INT, c STRING) PARTITIONED BY (d STRING)
    LOCATION 'sql/core/spark-warehouse/ext_table';
    ALTER TABLE ext_table CHANGE a a STRING COMMENT "new comment";
    DESC ext_table;
    ```
    The comment of column `a` is not updated, that's because `HiveExternalCatalog.doAlterTable` ignores table schema changes. To fix the issue, we should call `doAlterTableDataSchema` instead of `doAlterTable`.
    
    ## How was this patch tested?
    
    Updated `DDLSuite.testChangeColumn`.
    
    Author: Xingbo Jiang <xi...@databricks.com>
    
    Closes #20696 from jiangxb1987/alterColumnComment.

----


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

    https://github.com/apache/spark/pull/20768
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1377/
    Test PASSed.


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

    https://github.com/apache/spark/pull/20768
  
    Thanks! Merged to 2.3. 
    
    To backport it 2.2, you need a separate PR.


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

    https://github.com/apache/spark/pull/20768
  
    **[Test build #88071 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88071/testReport)** for PR 20768 at commit [`49038e6`](https://github.com/apache/spark/commit/49038e6a7115b3a4c20d8360299d3b4531fa109b).


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

    https://github.com/apache/spark/pull/20768
  
    Merged build finished. Test PASSed.


---

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


[GitHub] spark pull request #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABL...

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

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


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

Posted by jiangxb1987 <gi...@git.apache.org>.
Github user jiangxb1987 commented on the issue:

    https://github.com/apache/spark/pull/20768
  
    cc @cloud-fan can we merge this to 2.2?


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

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


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

    https://github.com/apache/spark/pull/20768
  
    **[Test build #88071 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/88071/testReport)** for PR 20768 at commit [`49038e6`](https://github.com/apache/spark/commit/49038e6a7115b3a4c20d8360299d3b4531fa109b).
     * This patch passes all tests.
     * This patch merges cleanly.
     * This patch adds no public classes.


---

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


[GitHub] spark issue #20768: [BACKPORT] [SPARK-23525] [SQL] Support ALTER TABLE CHANG...

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

    https://github.com/apache/spark/pull/20768
  
    Merged build finished. Test PASSed.


---

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