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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]