cloud-fan commented on a change in pull request #30421:
URL: https://github.com/apache/spark/pull/30421#discussion_r584796590
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/SQLInsertTestSuite.scala
##########
@@ -209,6 +211,43 @@ trait SQLInsertTestSuite extends QueryTest with
SQLTestUtils {
}
}
+ test("SPARK-33474: Support typed literals as partition spec values") {
+ withTable("t1", "t2", "t4", "t5") {
+ val binaryStr = "Spark SQL"
+ val binaryHexStr =
Hex.hex(UTF8String.fromString(binaryStr).getBytes).toString
+ sql("CREATE TABLE t1(name STRING, part DATE) USING PARQUET PARTITIONED
BY (part)")
+ sql("INSERT INTO t1 PARTITION(part = date'2019-01-02') VALUES('a')")
Review comment:
Can we create one table with many partition columns of different types,
and test the positive normal cases together?
```
CREATE TABLE t1(name STRING, p1 DATE, p2 TIMESTAMP, p3 ...) USING PARQUET
PARTITIONED BY (p1, p2, ...)
INSERT ...
```
----------------------------------------------------------------
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]