MaxGekk commented on a change in pull request #30449:
URL: https://github.com/apache/spark/pull/30449#discussion_r527957060
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/connector/DataSourceV2SQLSuite.scala
##########
@@ -2513,6 +2514,21 @@ class DataSourceV2SQLSuite
}
}
+ test("SPARK-33505: insert into partitioned table") {
+ val t = "testpart.ns1.ns2.tbl"
+ withTable(t) {
+ sql(s"""
+ |CREATE TABLE $t (id bigint, city string, data string)
+ |USING foo
+ |PARTITIONED BY (id, city)""".stripMargin)
+ sql(s"INSERT INTO $t PARTITION(id = 1, city = 'NY') SELECT 'abc'")
+
+ val partTable = catalog("testpart").asTableCatalog
+ .loadTable(Identifier.of(Array("ns1", "ns2"),
"tbl")).asInstanceOf[InMemoryPartitionTable]
+ assert(partTable.partitionExists(InternalRow.fromSeq(Seq(1,
UTF8String.fromString("NY")))))
Review comment:
Rebased on the master in which `import
org.apache.spark.sql.catalyst.InternalRow` was removed recently (as an unused
import probably).
----------------------------------------------------------------
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]