File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis
core/src/test/scala/org/apache/spark/sql/connector Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -1399,7 +1399,9 @@ class Analyzer(override val catalogManager: CatalogManager)
13991399 // ResolveOutputRelation runs, using the query's column names that will match the
14001400 // table names at that point. because resolution happens after a future rule, create
14011401 // an UnresolvedAttribute.
1402- EqualNullSafe (UnresolvedAttribute (attr.name), Cast (Literal (value), attr.dataType))
1402+ EqualNullSafe (
1403+ UnresolvedAttribute .quoted(attr.name),
1404+ Cast (Literal (value), attr.dataType))
14031405 case None =>
14041406 throw QueryCompilationErrors .unknownStaticPartitionColError(name)
14051407 }
Original file line number Diff line number Diff line change @@ -477,5 +477,15 @@ trait InsertIntoSQLOnlyTests
477477 verifyTable(t1, spark.table(view))
478478 }
479479 }
480+
481+ test(" SPARK-34599: InsertInto: overwrite - dot in the partition column name - static mode" ) {
482+ import testImplicits ._
483+ val t1 = " tbl"
484+ withTable(t1) {
485+ sql(s " CREATE TABLE $t1 (`a.b` string, `c.d` string) USING $v2Format PARTITIONED BY (`a.b`) " )
486+ sql(s " INSERT OVERWRITE $t1 PARTITION (`a.b` = 'a') (`c.d`) VALUES('b') " )
487+ verifyTable(t1, Seq (" a" -> " b" ).toDF(" id" , " data" ))
488+ }
489+ }
480490 }
481491}
You can’t perform that action at this time.
0 commit comments