You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/11/30 17:11:50 UTC

[GitHub] [spark] cloud-fan opened a new pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

cloud-fan opened a new pull request #30554:
URL: https://github.com/apache/spark/pull/30554


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   For CRETE TABLE [AS SELECT] command, creates native data source table if neither USING nor STORE AS is specified. Also provides a legacy config to restore the old behavior that creates hive table.
   
   This is a retry after we unify the CREATE TABLE syntax. It partially reverts https://github.com/apache/spark/commit/d2bec5e265e0aa4fa527c3f43cfe738cdbdc4598 
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   To be consistent with `DataFrameWriter.saveAsTable` API and to provide better performance by default.
   
   
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Yes, see the migration guide update.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   -->
   re-enable the tests


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737924567


   Kubernetes integration test status success
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36724/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r532810262



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2922,6 +2922,15 @@ object SQLConf {
     .stringConf
     .createWithDefault("")
 
+  val LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT =

Review comment:
       This seems to be inconsistent because the other code expects `LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT_ENABLED`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737370996






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533615403



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       I get your point that we want to allow the session catalog plugin to overwrite this restriction. I think it's as easy as moving the check to `V2SessionCatalog`, but then it's not very related to this PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan edited a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan edited a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736386185


   I've updated the PR description to include more details. I think this is not a big breaking change that needs a formal vote (we don't vote for every breaking change). It's mostly about hive-compatibility, not behavior changes. A normal PR review process should work here. But if someone has a different opinion, I'm OK to do a vote as well.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737924612






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737918817


   **[Test build #132131 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132131/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan closed pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan closed pull request #30554:
URL: https://github.com/apache/spark/pull/30554


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737469531






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735991629






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737139792






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736386185


   I've updated the PR description to include more details. I think this is not a big breaking change that needs a formal vote. It's mostly about hive-compatibility, not behavior changes. A normal PR review process should work here. But if someone has a different opinion, I'm OK to do a vote as well.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737333143






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736712335


   > I'll turn off the config once all tests pass, so that it's optional. I believe this at least is a useful feature for Spark vendors.
   
   I don't think there is any objection to having a config so you can change it in your environment. It is just that there should be more discussion at a minimum about breaking changes like this. I also don't think that Spark's versioning policy allows it.
   
   > BTW just to make it clear: breaking changes are allowed in point releases. You can read the migration guide for each point release to see examples.
   
   Can you point to where this is allowed by the [versioning policy](http://spark.apache.org/versioning-policy.html)?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736208612


   I agree with the point of describing the things and explaining rationalization. I would have imagined to have a detailed PR description as well.
   
   Enough discussion should better be made for a significant change of course. I don't believe this PR targeted to push without it - I don't believe such discussions should happen in a specific place like mailing list. They can happen in JIRA, PR, etc.
   
   One alternative is just to turn this switch off by default, issue warnings and turn it on later in another release in the future.
   
   Just to make it extra clear, what this PR changes looks correct and straightforward to me. Spark should create a Spark table when users `CREATE TABLE`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-738151911






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737198735






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737147755


   retest this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737924612






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735960802


   **[Test build #132003 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132003/testReport)** for PR 30554 at commit [`a2c4680`](https://github.com/apache/spark/commit/a2c46804c41dff3b0b945203ab9df301595f9b30).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736747295


   @cloud-fan . If this is a new configuration PR which is disabled by default, could you adjust PR title and description and remove `docs/sql-migration-guide.md` from this PR?
   > I'll turn off the config once all tests pass, so that it's optional. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737333143






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737309255


   **[Test build #132043 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132043/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).
    * This patch **fails SparkR unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533814216



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2922,6 +2922,15 @@ object SQLConf {
     .stringConf
     .createWithDefault("")
 
+  val LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT =
+    buildConf("spark.sql.legacy.createHiveTableByDefault")
+      .internal()
+      .doc("When set to true, CREATE TABLE syntax without a table provider will use hive " +
+        s"instead of the value of ${DEFAULT_DATA_SOURCE_NAME.key} as the table provider.")

Review comment:
       There are already a lot of legacy configurations, and there's no plan for how long we'll keep it. That's what I know as far as I have followed in the community. It would be a separate issue to decide lifetime of legacy configurations but ideally the legacy configurations will be removed in the major release bumpup I guess. I remember I discussed this with Sean as well somewhere. cc @srowen FYI




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533805487



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2922,6 +2922,15 @@ object SQLConf {
     .stringConf
     .createWithDefault("")
 
+  val LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT =
+    buildConf("spark.sql.legacy.createHiveTableByDefault")
+      .internal()
+      .doc("When set to true, CREATE TABLE syntax without a table provider will use hive " +

Review comment:
       ```suggestion
         .doc("When set to true, CREATE TABLE syntax without a table provider will use Hive " +
   ```




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737334954


   **[Test build #132058 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132058/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r534358054



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       Thanks for reverting this. Let me know and I can help review the addition later.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737163641






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737878014


   **[Test build #132123 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132123/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HeartSaVioR commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HeartSaVioR commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736177445


   I'd agree to change it even in minor release if we have discussed this for enough time in public, and put some efforts on figuring out impacts to the end users and guide in prior (like roadmap).
   
   I don't think we did anything I mentioned. The last discussion we did before Spark 3.0.0 was more likely concerning the change without proper discussion, and we reverted it. Unifying create table syntax fixes the long term issue along confused two create table syntaxes, but that's it and it's not a rationalization of changing the default provider.
   
   Changing the default provider for create table is totally different story. My experience of Spark community says that we're most likely reluctant to make a backward incompatible change (even we did for major release), and sometimes we set old behavior by default even the new functionality is available. I'm surprised PR description doesn't mention anything about impacts - do we really think this doesn't break anything?
   
   I agree this requires enough discussion in public before going further. In discussion we should make clear the benefits of changing this, "AND" the all possible impacts of changing this.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533612785



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       Please correct me if I read the code wrongly. Previously Spark fails when EXTERNAL is specified and the following two conditions are met:
   1. it's a hive table and LOCATION is not specified.
   2. it's a data source table.
   
   That said, we had a big restriction before that EXTERNAL is forbidden completely for data source tables, no matter LOCATION is present or not. Now my change allows it if LOCATION is present.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735969741


   > Do you think we need a vote for this, @cloud-fan and @gatorsmile?
   
   I think a vote should be required before committing this if the intent is to change the default behavior of CREATE TABLE. I'm not sure that a vote would even be appropriate given that breaking behavior changes are generally not included in point releases.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736752154


   All tests pass, I'm changing it now.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735957226


   Do you think we need a vote for this, @cloud-fan and @gatorsmile ?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737905829






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737165830


   **[Test build #132043 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132043/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737901470


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/36724/
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737466362


   **[Test build #132058 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132058/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-738021477






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735964812






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737333337


   retest this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r532817212



##########
File path: docs/sql-migration-guide.md
##########
@@ -54,6 +54,8 @@ license: |
   
   - In Spark 3.1, creating or altering a view will capture runtime SQL configs and store them as view properties. These configs will be applied during the parsing and analysis phases of the view resolution. To restore the behavior before Spark 3.1, you can set `spark.sql.legacy.useCurrentConfigsForView` to `true`.
 
+  - In Spark 3.1, `CREATE TABLE` without a specific table provider uses the value of `spark.sql.sources.default` as its table provider. In Spark version 3.0 and below, it was Hive. To restore the behavior before Spark 3.1, you can set `spark.sql.legacy.createHiveTableByDefault.enabled` to `true`.

Review comment:
       I don't think that the default behavior of `CREATE TABLE` should change in a point release. Why is this considered a "safe" change to make?
   
   This could easily break existing workflows and should be done in a major release.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735960802


   **[Test build #132003 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132003/testReport)** for PR 30554 at commit [`a2c4680`](https://github.com/apache/spark/commit/a2c46804c41dff3b0b945203ab9df301595f9b30).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-738021477






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737198735






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737099244


   **[Test build #132034 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132034/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] holdenk commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
holdenk commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533812048



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2922,6 +2922,15 @@ object SQLConf {
     .stringConf
     .createWithDefault("")
 
+  val LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT =
+    buildConf("spark.sql.legacy.createHiveTableByDefault")
+      .internal()
+      .doc("When set to true, CREATE TABLE syntax without a table provider will use hive " +
+        s"instead of the value of ${DEFAULT_DATA_SOURCE_NAME.key} as the table provider.")

Review comment:
       If this is a "legacy" key mention how long folks can depend on it.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] holdenk commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
holdenk commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533821836



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -2922,6 +2922,15 @@ object SQLConf {
     .stringConf
     .createWithDefault("")
 
+  val LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT =
+    buildConf("spark.sql.legacy.createHiveTableByDefault")
+      .internal()
+      .doc("When set to true, CREATE TABLE syntax without a table provider will use hive " +
+        s"instead of the value of ${DEFAULT_DATA_SOURCE_NAME.key} as the table provider.")

Review comment:
       If we have a general policy for legacy configs that means this remains the same until Spark 4 by default I guess there is no need to document it here (I don't remember that conversation but I was out for a few months last/this year).




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735979939


   +1 for @rdblue 's opinion.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737878014


   **[Test build #132123 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132123/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737894929


   **[Test build #132123 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132123/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-738076559


   GA passed, merging to master, thanks for the review!


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737918817


   **[Test build #132131 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132131/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-738129048


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


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533833283



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       This PR adds support for `EXTERNAL` with data source tables, but only for tables with the `LOCATION` clause. I have no problem with adding that support, or for enforcing the `LOCATION` restriction in Spark's catalog.
   
   The problem is that it is done in the analyzer rather than in the catalog implementation, so the `LOCATION` clause restriction is applied before calling a v2 extension to the session catalog.
   
   We've now had several problems with behavior mismatches between the session catalog and other v2 catalogs, so I think that support for `EXTERNAL` should be added properly: pass the flag correctly to the v2 extension and enforce the `LOCATION` restriction in the catalog rather than in the analysis rules. I'd also like to have tests for the newly supported SQL cases to validate that behavior.
   
   I know that the reason behind this was to avoid test failures, but I think only partially adding this feature means that it isn't done right: it introduces a behavior difference between session and other v2 catalogs, and would be missing tests.
   
   If you want to update this to add the `LOCATION` restriction in the session catalog, pass the v2 property correctly to catalog extensions, and add tests, then I'm okay with this change. However, then we would be looking at a significantly larger PR, so it is unlikely that this should be done at the same time as adding configuration to use data source tables by default.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533612785



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       Please correct me if I read the code wrongly. Previously Spark fails when EXTERNAL is specified and the following two conditions are met:
   1. it's a hive table and LOCATION is not specified.
   2. it's a data source table.
   
   That said, we had a big restriction before that EXTERNAL is forbidden completely for data source tables, **no matter LOCATION is present or not**. Now my change allows it if LOCATION is present.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533602534



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       > but the effect of this change is to disallow EXTERNAL when LOCATION is not present.
   
   This is already the case before this PR. The error message is pretty clear about it: `CREATE EXTERNAL TABLE must be accompanied by LOCATION`. The change here only loose the restrictions.
   
   I include this change because otherwise tests that use `CREATE EXTERNAL TABLE ... LOCATION` without USING or STORED AS are failing.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533591131



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       The PR description says "This PR allows CREATE EXTERNAL TABLE when LOCATION is present" but the effect of this change is to disallow `EXTERNAL` when `LOCATION` is not present.
   
   Since the session catalog may be wrapped by a v2 catalog, this disallows `EXTERNAL` for some v2 catalog plugin use cases. That violates the v2 behavior expectations because `EXTERNAL` should be passed to a v2 catalog unless it would have failed before. I don't think this change is correct.
   
   Also, why does this change need to be included to change the default provider? If it doesn't need to be included, then it should be in a separate PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736153495


   I don't think this is something banned as long as we have a way to restore the previous behaviour. More importantly, in Apache Spark, `CREATE TABLE` should create a Spark table, not Hive table.
   
   _All_ items in the migration guide are behaviour changes since we don't usually list bug fixes in the migration guide. I can provide a bunch of similar examples if you guys doubt.
   
   So I believe the point we should discuss/focus here is that this is a significant behaviour change since `CREATE TABLE` is the very entry point of users. Personally the vote sounds fine to me given that two committers think it might better need.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r534356013



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -636,11 +636,16 @@ class ResolveSessionCatalog(
       (storageFormat, DDLUtils.HIVE_PROVIDER)
     } else {
       // If neither USING nor STORED AS/ROW FORMAT is specified, we create native data source
-      // tables if it's a CTAS and `conf.convertCTAS` is true.
-      // TODO: create native data source table by default for non-CTAS.
-      if (ctas && conf.convertCTAS) {
+      // tables if:
+      //   1. `LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT` is false, or
+      //   2. It's a CTAS and `conf.convertCTAS` is true.
+      val createHiveTableByDefault = conf.getConf(SQLConf.LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT)
+      if (!createHiveTableByDefault || (ctas && conf.convertCTAS)) {

Review comment:
       Should this mark `convertCTAS` as deprecated since it is superseded by the new config?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r534358375



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -636,11 +636,16 @@ class ResolveSessionCatalog(
       (storageFormat, DDLUtils.HIVE_PROVIDER)
     } else {
       // If neither USING nor STORED AS/ROW FORMAT is specified, we create native data source
-      // tables if it's a CTAS and `conf.convertCTAS` is true.
-      // TODO: create native data source table by default for non-CTAS.
-      if (ctas && conf.convertCTAS) {
+      // tables if:
+      //   1. `LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT` is false, or
+      //   2. It's a CTAS and `conf.convertCTAS` is true.
+      val createHiveTableByDefault = conf.getConf(SQLConf.LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT)
+      if (!createHiveTableByDefault || (ctas && conf.convertCTAS)) {

Review comment:
       it's a bit hard to deprecate `convertCTAS` as that's on by default, while the new config disables the new feature by default. We need `convertCTAS` to retain the existing behavior:
   1. CREATE TABLE creates Hive table
   2. CREATE TABLE AS SELECT creates Parquet table.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737469531






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737139792






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736693344


   > But if someone has a different opinion, I'm OK to do a vote as well.
   
   From reading this thread, I think it is safe to say that @HeartSaVioR, @dongjoon-hyun, and I have all expressed an opinion that this requries a wider discussion on the dev list, followed by a vote if there isn't already clear consensus.
   
   I think that discussion also needs to address how this will affect users with jobs running in Spark 3.0, and why you consider it safe enough for a point release.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r534360508



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -636,11 +636,16 @@ class ResolveSessionCatalog(
       (storageFormat, DDLUtils.HIVE_PROVIDER)
     } else {
       // If neither USING nor STORED AS/ROW FORMAT is specified, we create native data source
-      // tables if it's a CTAS and `conf.convertCTAS` is true.
-      // TODO: create native data source table by default for non-CTAS.
-      if (ctas && conf.convertCTAS) {
+      // tables if:
+      //   1. `LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT` is false, or
+      //   2. It's a CTAS and `conf.convertCTAS` is true.
+      val createHiveTableByDefault = conf.getConf(SQLConf.LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT)
+      if (!createHiveTableByDefault || (ctas && conf.convertCTAS)) {

Review comment:
       yea, I can do it in a follow-up.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737334954


   **[Test build #132058 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132058/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan edited a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan edited a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736717184


   > How is changing the file format by default a corner case?
   
   I was saying accessing data files of Spark tables directly are corner cases. Users create a table because they want to access the data by table name, not directory.
   
   > Hive tables support partitions that use different formats and serde, but Spark tables do not. 
   
   This is a good point. It's not possible to do it via Spark DDL commands, but people can create table with Spark, then add partitions with different serdes with Hive. I'll put it in the  `Does this PR introduce any user-facing change?` section.
   
   > Can you point to where this is allowed by the versioning policy?
   
   Quoted below:
   > The Spark project strives to avoid breaking APIs or silently changing behavior, even at major versions. While this is not always possible, the balance of the following factors should be considered before choosing to break an API.
   
   We try to avoid breaking changes, but we don't completely forbid it. Breaking changes are allowed when it's justified. We definitely don't allow arbitrary breaking changes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737383178


   > > Can you point to where this is allowed by the versioning policy?
   > 
   > Quoted below:
   > 
   > > The Spark project strives to avoid breaking APIs or silently changing behavior, even at major versions. While this is not always possible, the balance of the following factors should be considered before choosing to break an API.
   > 
   > We try to avoid breaking changes, but we don't completely forbid it. Breaking changes are allowed when it's justified. We definitely don't allow arbitrary breaking changes.
   
   I think that you're misinterpreting it. That means that Spark avoids breaking APIs and behavior even at major releases. It is more strict, not more lax.
   
   It does not mean that the rules are flexible and Spark will make breaking behavior changes. This expectation is set in the first paragraph, where it states that Spark will follow semver, except for a small set of multi-module issues.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737165830


   **[Test build #132043 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132043/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737370996






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737147292


   **[Test build #132034 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132034/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).
    * This patch **fails Spark unit tests**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-738151911






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736717184


   > How is changing the file format by default a corner case?
   
   I was saying accessing data files of Spark tables differently are corner cases. Users create a table because they want to access the data by table name, not directory.
   
   > Hive tables support partitions that use different formats and serde, but Spark tables do not. 
   
   This is a good point. It's not possible to do it via Spark DDL commands, but people can create table with Spark, then add partitions with different serdes with Hive. I'll put it in the  `Does this PR introduce any user-facing change?` section.
   
   > Can you point to where this is allowed by the versioning policy?
   
   Quoted below:
   > The Spark project strives to avoid breaking APIs or silently changing behavior, even at major versions. While this is not always possible, the balance of the following factors should be considered before choosing to break an API.
   
   We try to avoid breaking changes, but we don't completely forbid it. Breaking changes are allowed when it's justified. We definitely don't allow arbitrary breaking changes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737905829






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736700644


   I'll turn off the config once all tests pass, so that it's optional. I believe this at least is a useful feature for Spark vendors. In the meanwhile, I'll send an email to discuss it.
   
   BTW just to make it clear: breaking changes are allowed in point releases. You can read the migration guide for each point release to see examples.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735991629






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735964788


   **[Test build #132003 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132003/testReport)** for PR 30554 at commit [`a2c4680`](https://github.com/apache/spark/commit/a2c46804c41dff3b0b945203ab9df301595f9b30).
    * This patch **fails to build**.
    * This patch merges cleanly.
    * This patch adds no public classes.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HeartSaVioR edited a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HeartSaVioR edited a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736177445


   I'd agree to change it even in minor release if we have discussed this for enough time in public, and put some efforts on figuring out impacts to the end users and guide in prior (like roadmap).
   
   I don't think we did anything I mentioned. The last discussion we did before Spark 3.0.0 was more likely concerning the change without proper discussion, and we reverted it. Unifying create table syntax fixes the long term issue along confused two create table syntaxes, but that's it and it's not a rationalization of changing the default provider.
   
   Changing the default provider for create table is totally different story. My experience of Spark community says that we're most likely reluctant to make a backward incompatible change (even we did for major release), and sometimes we set old behavior by default even the new functionality is available. I'm surprised PR description doesn't mention anything about impacts.
   
   I agree this requires enough discussion in public before going further. In discussion we should make clear the benefits of changing this, "AND" the all possible impacts of changing this.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on a change in pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533605877



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       Before, this was enforcing that `EXTERNAL` could not be combined with `USING`, which was the previous behavior.
   
   Now, it is enforcing that `EXTERNAL` cannot be present without `LOCATION` for data source tables, which has been discussed by the community and decided against. I think this should be left alone, or that it should be enforced in the session catalog rather than the analyzer rules.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] dongjoon-hyun commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735956271


   cc @rdblue 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533805836



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -636,9 +636,11 @@ class ResolveSessionCatalog(
       (storageFormat, DDLUtils.HIVE_PROVIDER)
     } else {
       // If neither USING nor STORED AS/ROW FORMAT is specified, we create native data source
-      // tables if it's a CTAS and `conf.convertCTAS` is true.
-      // TODO: create native data source table by default for non-CTAS.
-      if (ctas && conf.convertCTAS) {
+      // tables if:
+      //   1. `LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT` is false, or
+      //   2. It's a CTAS and `conf.convertCTAS` is true.
+      val createHiveTableByDefault = conf.getConf(SQLConf.LEGACY_CREATE_HIVE_TABLE_BY_DEFAULT)

Review comment:
       I would even think about printing a warning that creating a Hive table by default is deprecated, and this configuration will be disabled by default in the future because Spark should create a Spark table.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-735964812






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] holdenk commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
holdenk commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533818936



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       We might as well delegate this to the catalog if we're going to bother changing this code path as part of this PR.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737099244


   **[Test build #132034 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/132034/testReport)** for PR 30554 at commit [`bff924d`](https://github.com/apache/spark/commit/bff924de21b8af2da17f31591768ce02c784bd43).


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon edited a comment on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
HyukjinKwon edited a comment on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736208612


   I agree with the point of describing the things and explaining rationalization. I would have imagined to have a detailed PR description as well.
   
   Enough discussion should better be made for a significant change of course. I don't believe this PR targeted to push without it. Also, I don't believe such discussions should happen in a specific place like mailing list. They can happen in JIRA, PR, etc.
   
   One alternative is just to turn this switch off by default, issue warnings and turn it on later in another release in the future.
   
   Just to make it extra clear, what this PR changes looks correct and straightforward to me. Spark should create a Spark table when users `CREATE TABLE`.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-737914579


   retest this please


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on a change in pull request #30554: [SPARK-30098][SQL] Add a configuration to use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on a change in pull request #30554:
URL: https://github.com/apache/spark/pull/30554#discussion_r533881466



##########
File path: sql/core/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveSessionCatalog.scala
##########
@@ -657,14 +659,8 @@ class ResolveSessionCatalog(
       comment: Option[String],
       storageFormat: CatalogStorageFormat,
       external: Boolean): CatalogTable = {
-    if (external) {
-      if (DDLUtils.isHiveTable(Some(provider))) {
-        if (location.isEmpty) {
-          throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")
-        }
-      } else {
-        throw new AnalysisException(s"Operation not allowed: CREATE EXTERNAL TABLE ... USING")
-      }
+    if (external && location.isEmpty) {
+      throw new AnalysisException(s"CREATE EXTERNAL TABLE must be accompanied by LOCATION")

Review comment:
       > but I think only partially adding this feature means that it isn't done right
   
   OK now we are on the same page. This change doesn't add new restriction, but you think we should loose the restriction in a more proper way that works better with session catalog plugin.
   
   I agree with it, and I'm going to revert this change (since I fliped the config) and do it later.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] rdblue commented on pull request #30554: [SPARK-30098][SQL] Use default datasource as provider for CREATE TABLE command

Posted by GitBox <gi...@apache.org>.
rdblue commented on pull request #30554:
URL: https://github.com/apache/spark/pull/30554#issuecomment-736704540


   > One potential issue is CREATE TABLE ... LOCATION ... while users want to directly access the files later. It's more like a corner case and the legacy config should be good enough.
   
   Can you explain this reasoning more clearly? How is changing the file format by default a corner case?
   
   > there is no behavior difference between data source and hive tables.
   
   I don't think this is accurate. What about the file format change above? Is that not a behavior difference?
   
   Hive tables support partitions that use different formats and serde, but Spark tables do not. That is a table behavior difference as well.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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