cloud-fan commented on a change in pull request #34667:
URL: https://github.com/apache/spark/pull/34667#discussion_r771367364
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/DataFrameWriter.scala
##########
@@ -607,20 +616,23 @@ final class DataFrameWriter[T] private[sql](ds:
Dataset[T]) {
// We have a potential race condition here in AppendMode, if the table
suddenly gets
// created between our existence check and physical execution, but
this can't be helped
// in any case.
- CreateTableAsSelectStatement(
- nameParts,
- df.queryExecution.analyzed,
+ val tableSpec = TableSpec(
+ bucketSpec = None,
+ properties = Map.empty,
+ provider = Some(source),
+ options = Map.empty,
+ location = extraOptions.get("path"),
+ comment = extraOptions.get(TableCatalog.PROP_COMMENT),
+ serde = None,
+ external = false)
+
+ CreateTableAsSelect(
+ UnresolvedDBObjectName(nameParts, isNamespace = false),
partitioningAsV2,
- None,
- Map.empty,
- Some(source),
+ df.queryExecution.analyzed,
+ tableSpec,
Map.empty,
Review comment:
@huaxingao can you fix this similar bug as well when you open the 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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]