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

[GitHub] spark pull request: [SPARK-14507] [SQL] EXTERNAL keyword in a CTAS statement...

Github user gatorsmile commented on the pull request:

    https://github.com/apache/spark/pull/13395
  
    Just realized you are working on all the restrictions of CTAS. Based on the [official document of Hive](https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL#LanguageManualDDL-CreateTableAsSelect(CTAS)), CTAS has three restrictions:
    - The target table cannot be a partitioned table.
    - The target table cannot be an external table.
    - The target table cannot be a list bucketing table.
    
    I have two test cases you can put in `DDLCommandSuite`:
    ```scala
      test("CTAS - PARTITIONED BY is not supported") {
        assertUnsupported(
          sql = "CREATE TABLE my_tab(a double, b double) PARTITIONED BY (a STRING) " +
            "AS SELECT key, value FROM mytable1")
      }
    
      test("CTAS - Bucketing is not supported") {
        assertUnsupported(
          sql = "CREATE TABLE my_tab(a double, b double) " +
            "CLUSTERED BY (a) SORTED BY (b) INTO 5 BUCKETS AS SELECT key, value FROM mytable1")
      }
    ```


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