You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by windpiger <gi...@git.apache.org> on 2017/02/24 07:35:03 UTC

[GitHub] spark pull request #17055: [SPARK-19723][SQL]create datasource table with an...

GitHub user windpiger opened a pull request:

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

    [SPARK-19723][SQL]create datasource table with an non-existent location should work

    ## What changes were proposed in this pull request?
    
    This JIRA is a follow up work after SPARK-19583
    
    As we discussed in that [PR|https://github.com/apache/spark/pull/16938] 
    
    The following DDL for datasource table with an non-existent location should work:
    ```
    CREATE TABLE ... (PARTITIONED BY ...) LOCATION path
    ```
    Currently it will throw exception that path not exists
    
    ## How was this patch tested?
    unit test added

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

    $ git pull https://github.com/windpiger/spark CTDataSourcePathNotExists

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

    https://github.com/apache/spark/pull/17055.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 #17055
    
----
commit 89eb03ad763538ec84cdd447cb51079881b4f9ac
Author: windpiger <so...@outlook.com>
Date:   2017-02-24T07:33:23Z

    [SPARK-19723][SQL]create datasource table with an non-existent location should work

----


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74360/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74361 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74361/testReport)** for PR 17055 at commit [`ada275c`](https://github.com/apache/spark/commit/ada275cde7d7ca189342446b4ddefcdd97c45d85).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74003 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74003/testReport)** for PR 17055 at commit [`d4378dd`](https://github.com/apache/spark/commit/d4378dde56dd19f0087ddb4ace49186b62dda9b6).
     * This patch **fails Scala style 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74015 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74015/testReport)** for PR 17055 at commit [`3ea3e9d`](https://github.com/apache/spark/commit/3ea3e9d4bc3b2461edfd4e3c97f980542c923f0e).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73762 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73762/testReport)** for PR 17055 at commit [`0e09b92`](https://github.com/apache/spark/commit/0e09b929e110d37d564b105acfe909e4d23111ed).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74361/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    OK thanks a lot\uff5e


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73408 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73408/testReport)** for PR 17055 at commit [`89eb03a`](https://github.com/apache/spark/commit/89eb03ad763538ec84cdd447cb51079881b4f9ac).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74010/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73427 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73427/testReport)** for PR 17055 at commit [`89eb03a`](https://github.com/apache/spark/commit/89eb03ad763538ec84cdd447cb51079881b4f9ac).
     * 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74015 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74015/testReport)** for PR 17055 at commit [`3ea3e9d`](https://github.com/apache/spark/commit/3ea3e9d4bc3b2461edfd4e3c97f980542c923f0e).
     * 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/73762/
    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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r104351251
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1588,8 +1588,102 @@ class HiveDDLSuite
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    --- End diff --
    
    Let me try to combine the HiveDDLSuite.scala and DDLSuite.scala. Otherwise, the test cases need to be duplicated in every PR. 


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74264 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74264/testReport)** for PR 17055 at commit [`4024d7c`](https://github.com/apache/spark/commit/4024d7c3c9a1c4510755dc1c46c827063c4a3c76).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74360 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74360/testReport)** for PR 17055 at commit [`e1c891e`](https://github.com/apache/spark/commit/e1c891e13bcda3ea5849e89c522263bf63654942).
     * This patch **fails Scala style 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74361 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74361/testReport)** for PR 17055 at commit [`ada275c`](https://github.com/apache/spark/commit/ada275cde7d7ca189342446b4ddefcdd97c45d85).
     * 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r104351006
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -1950,8 +1950,53 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempDir {
    +        dir =>
    --- End diff --
    
    Nit: style issue. the above two lines can be combined together.


---
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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r102915883
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -1952,4 +1952,49 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
           }
         }
       }
    +
    +  test("create datasource table with an non-existent location") {
    +    withTable("t", "t1") {
    +      withTempDir {
    +        dir =>
    +          dir.delete()
    --- End diff --
    
    there are lots of dir existed test case in DDLSuit or HiveDDLSuit, so we just add non-existent test cases


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    cc @gatorsmile @cloud-fan 


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74003/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    retest this please


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    @gatorsmile I have merged with master\uff0cif it is ok,  could you help to merge 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r104351051
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -1950,8 +1950,53 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempDir {
    +        dir =>
    +          dir.delete()
    +          spark.sql(
    +            s"""
    +               |CREATE TABLE t(a int, b int)
    +               |USING parquet
    +               |LOCATION '$dir'
    +             """.stripMargin)
    --- End diff --
    
    The test case is already pretty long. Please reduce the sql statement to a single line.


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74264/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74015/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73415 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73415/testReport)** for PR 17055 at commit [`89eb03a`](https://github.com/apache/spark/commit/89eb03ad763538ec84cdd447cb51079881b4f9ac).
     * 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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r105526116
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -2016,48 +2016,79 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempPath { dir =>
    +        spark.sql(s"CREATE TABLE t(a int, b int) USING parquet LOCATION '$dir'")
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t SELECT 1, 2")
    +        assert(dir.exists())
    +
    +        checkAnswer(spark.table("t"), Row(1, 2))
    +      }
    +      // partition table
    +      withTempPath { dir =>
    +        spark.sql(
    +          s"""
    +             |CREATE TABLE t1(a int, b int) USING parquet PARTITIONED BY(a) LOCATION '$dir'
    +           """.stripMargin)
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t1"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t1 PARTITION(a=1) SELECT 2")
    +
    +        val partDir = new File(dir, "a=1")
    +        assert(partDir.exists())
    +
    +        checkAnswer(spark.table("t1"), Row(2, 1))
    +      }
    +    }
    +  }
    +
       Seq(true, false).foreach { shouldDelete =>
    -    val tcName = if (shouldDelete) "non-existent" else "existed"
    +    val tcName = if (shouldDelete) "non-existing" else "existed"
         test(s"CTAS for external data source table with a $tcName location") {
           withTable("t", "t1") {
    -        withTempDir {
    -          dir =>
    -            if (shouldDelete) {
    -              dir.delete()
    -            }
    -            spark.sql(
    -              s"""
    -                 |CREATE TABLE t
    -                 |USING parquet
    -                 |LOCATION '$dir'
    -                 |AS SELECT 3 as a, 4 as b, 1 as c, 2 as d
    -               """.stripMargin)
    -            val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    -            assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +        withTempDir { dir =>
    +          if (shouldDelete) {
    +            dir.delete()
    +          }
    --- End diff --
    
    ok 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/73415/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    I will review this PR in the next few days. 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74261 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74261/testReport)** for PR 17055 at commit [`bc7f08d`](https://github.com/apache/spark/commit/bc7f08da8642cd37950f94baabf1b305df74d616).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73427 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73427/testReport)** for PR 17055 at commit [`89eb03a`](https://github.com/apache/spark/commit/89eb03ad763538ec84cdd447cb51079881b4f9ac).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73415 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73415/testReport)** for PR 17055 at commit [`89eb03a`](https://github.com/apache/spark/commit/89eb03ad763538ec84cdd447cb51079881b4f9ac).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    ok, thanks very much~


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    retest this please


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    thanks, merging to master!


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/73427/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #73762 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/73762/testReport)** for PR 17055 at commit [`0e09b92`](https://github.com/apache/spark/commit/0e09b929e110d37d564b105acfe909e4d23111ed).
     * 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74263/
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    @gatorsmile this pr could be merged? 


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test PASSed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/74261/
    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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r105519542
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -2016,48 +2016,79 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempPath { dir =>
    +        spark.sql(s"CREATE TABLE t(a int, b int) USING parquet LOCATION '$dir'")
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t SELECT 1, 2")
    +        assert(dir.exists())
    +
    +        checkAnswer(spark.table("t"), Row(1, 2))
    +      }
    +      // partition table
    +      withTempPath { dir =>
    +        spark.sql(
    +          s"""
    +             |CREATE TABLE t1(a int, b int) USING parquet PARTITIONED BY(a) LOCATION '$dir'
    +           """.stripMargin)
    --- End diff --
    
    exceed 100 characters. code style check 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74263 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74263/testReport)** for PR 17055 at commit [`207448d`](https://github.com/apache/spark/commit/207448d47706e1664910842cafd168e08840b1b5).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    ping @gatorsmile 


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74263 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74263/testReport)** for PR 17055 at commit [`207448d`](https://github.com/apache/spark/commit/207448d47706e1664910842cafd168e08840b1b5).
     * 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74010 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74010/testReport)** for PR 17055 at commit [`4c82dfb`](https://github.com/apache/spark/commit/4c82dfb94889be7f17bda59c8a7d4ec975528fb4).


---
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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r105490533
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -2016,48 +2016,79 @@ abstract class DDLSuite extends QueryTest with SQLTestUtils {
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempPath { dir =>
    +        spark.sql(s"CREATE TABLE t(a int, b int) USING parquet LOCATION '$dir'")
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t SELECT 1, 2")
    +        assert(dir.exists())
    +
    +        checkAnswer(spark.table("t"), Row(1, 2))
    +      }
    +      // partition table
    +      withTempPath { dir =>
    +        spark.sql(
    +          s"""
    +             |CREATE TABLE t1(a int, b int) USING parquet PARTITIONED BY(a) LOCATION '$dir'
    +           """.stripMargin)
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t1"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t1 PARTITION(a=1) SELECT 2")
    +
    +        val partDir = new File(dir, "a=1")
    +        assert(partDir.exists())
    +
    +        checkAnswer(spark.table("t1"), Row(2, 1))
    +      }
    +    }
    +  }
    +
       Seq(true, false).foreach { shouldDelete =>
    -    val tcName = if (shouldDelete) "non-existent" else "existed"
    +    val tcName = if (shouldDelete) "non-existing" else "existed"
         test(s"CTAS for external data source table with a $tcName location") {
           withTable("t", "t1") {
    -        withTempDir {
    -          dir =>
    -            if (shouldDelete) {
    -              dir.delete()
    -            }
    -            spark.sql(
    -              s"""
    -                 |CREATE TABLE t
    -                 |USING parquet
    -                 |LOCATION '$dir'
    -                 |AS SELECT 3 as a, 4 as b, 1 as c, 2 as d
    -               """.stripMargin)
    -            val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    -            assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +        withTempDir { dir =>
    +          if (shouldDelete) {
    +            dir.delete()
    +          }
    --- End diff --
    
    ```if (shouldDelete) dir.delete()```


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r105520260
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1663,95 +1663,127 @@ class HiveDDLSuite
         }
       }
     
    +  test("create hive table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempPath { dir =>
    +        spark.sql(s"CREATE TABLE t(a int, b int) USING hive LOCATION '$dir'")
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t SELECT 1, 2")
    +        assert(dir.exists())
    +
    +        checkAnswer(spark.table("t"), Row(1, 2))
    +      }
    +      // partition table
    +      withTempPath { dir =>
    +        spark.sql(
    +          s"""
    +             |CREATE TABLE t1(a int, b int)
    +             |USING hive
    +             |PARTITIONED BY(a)
    +             |LOCATION '$dir'
    +           """.stripMargin)
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t1"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t1 PARTITION(a=1) SELECT 2")
    +
    +        val partDir = new File(dir, "a=1")
    +        assert(partDir.exists())
    +
    +        checkAnswer(spark.table("t1"), Row(2, 1))
    +      }
    +    }
    +  }
    +
       Seq(true, false).foreach { shouldDelete =>
    -    val tcName = if (shouldDelete) "non-existent" else "existed"
    +    val tcName = if (shouldDelete) "non-existing" else "existed"
         test(s"CTAS for external data source table with a $tcName location") {
    --- End diff --
    
    oh, it is. after we also qualified the location path for InMemoryCatalog, the code for equal two location are the same with HiveExternalCatalog. 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74360 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74360/testReport)** for PR 17055 at commit [`e1c891e`](https://github.com/apache/spark/commit/e1c891e13bcda3ea5849e89c522263bf63654942).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74010 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74010/testReport)** for PR 17055 at commit [`4c82dfb`](https://github.com/apache/spark/commit/4c82dfb94889be7f17bda59c8a7d4ec975528fb4).
     * This patch **fails Scala style 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    Test FAILed.
    Refer to this link for build results (access rights to CI server needed): 
    https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/73408/
    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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r105473200
  
    --- Diff: sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveDDLSuite.scala ---
    @@ -1663,95 +1663,127 @@ class HiveDDLSuite
         }
       }
     
    +  test("create hive table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempPath { dir =>
    +        spark.sql(s"CREATE TABLE t(a int, b int) USING hive LOCATION '$dir'")
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t SELECT 1, 2")
    +        assert(dir.exists())
    +
    +        checkAnswer(spark.table("t"), Row(1, 2))
    +      }
    +      // partition table
    +      withTempPath { dir =>
    +        spark.sql(
    +          s"""
    +             |CREATE TABLE t1(a int, b int)
    +             |USING hive
    +             |PARTITIONED BY(a)
    +             |LOCATION '$dir'
    +           """.stripMargin)
    +
    +        val table = spark.sessionState.catalog.getTableMetadata(TableIdentifier("t1"))
    +        assert(table.location == makeQualifiedPath(dir.getAbsolutePath))
    +
    +        spark.sql("INSERT INTO TABLE t1 PARTITION(a=1) SELECT 2")
    +
    +        val partDir = new File(dir, "a=1")
    +        assert(partDir.exists())
    +
    +        checkAnswer(spark.table("t1"), Row(2, 1))
    +      }
    +    }
    +  }
    +
       Seq(true, false).foreach { shouldDelete =>
    -    val tcName = if (shouldDelete) "non-existent" else "existed"
    +    val tcName = if (shouldDelete) "non-existing" else "existed"
         test(s"CTAS for external data source table with a $tcName location") {
    --- End diff --
    
    now it's duplicated with https://github.com/apache/spark/pull/17055/files#diff-2d45592564aa2eea4e85ffd000d8a14eR2054


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74264 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74264/testReport)** for PR 17055 at commit [`4024d7c`](https://github.com/apache/spark/commit/4024d7c3c9a1c4510755dc1c46c827063c4a3c76).
     * 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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74003 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74003/testReport)** for PR 17055 at commit [`d4378dd`](https://github.com/apache/spark/commit/d4378dde56dd19f0087ddb4ace49186b62dda9b6).


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    **[Test build #74261 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/74261/testReport)** for PR 17055 at commit [`bc7f08d`](https://github.com/apache/spark/commit/bc7f08da8642cd37950f94baabf1b305df74d616).
     * 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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

    https://github.com/apache/spark/pull/17055#discussion_r104350967
  
    --- Diff: sql/core/src/test/scala/org/apache/spark/sql/execution/command/DDLSuite.scala ---
    @@ -1950,8 +1950,53 @@ class DDLSuite extends QueryTest with SharedSQLContext with BeforeAndAfterEach {
         }
       }
     
    +  test("create datasource table with a non-existing location") {
    +    withTable("t", "t1") {
    +      withTempDir {
    +        dir =>
    +          dir.delete()
    --- End diff --
    
    `withTempPath`?


---
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 issue #17055: [SPARK-19723][SQL]create datasource table with an non-ex...

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

    https://github.com/apache/spark/pull/17055
  
    I will review it today. 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 #17055: [SPARK-19723][SQL]create datasource table with an...

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

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


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