[ https://issues.apache.org/jira/browse/SPARK-31298?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angerszhu updated SPARK-31298: ------------------------------ Summary: validate CTAS table path in SPARK-19724 seems conflict and External table also need to check non-empty (was: validate CTAS table path in SPARK-19724 seems conflict) > validate CTAS table path in SPARK-19724 seems conflict and External table > also need to check non-empty > ------------------------------------------------------------------------------------------------------ > > Key: SPARK-31298 > URL: https://issues.apache.org/jira/browse/SPARK-31298 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.0.0 > Reporter: angerszhu > Priority: Major > > InĀ SessionCatalog.validateTableLocation() > {code:java} > val tableLocation = > new > Path(table.storage.locationUri.getOrElse(defaultTablePath(table.identifier))) > {code} > But in CreateDataSourceTableAsSelect , table location use defaultTablePath > {code:java} > assert(table.schema.isEmpty) > sparkSession.sessionState.catalog.validateTableLocation(table) > val tableLocation = if (table.tableType == CatalogTableType.MANAGED) { > Some(sessionState.catalog.defaultTablePath(table.identifier)) > } else { > table.storage.locationUri > } > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org