dongjoon-hyun commented on code in PR #60373:
URL: https://github.com/apache/spark/pull/60373#discussion_r4553411460
##########
sql/core/src/test/scala/org/apache/spark/sql/DataFrameWriterV2Suite.scala:
##########
@@ -279,6 +279,19 @@ class DataFrameWriterV2Suite extends SharedSparkSession
with BeforeAndAfter {
Seq(Row(1L, "a"), Row(2L, "b"), Row(4L, "d"), Row(5L, "e"), Row(6L,
"f")))
}
+ test("SPARK-61504: Overwrite: overwrite by expression on a CHAR column") {
+ spark.sql(
+ "CREATE TABLE testcat.table_name (id bigint, dep char(8)) USING foo
PARTITIONED BY (dep)")
+ spark.sql("INSERT INTO testcat.table_name VALUES (1L, 'hr'), (2L,
'software')")
+
+ // the query is not resolved when the command is created, unlike the query
of a SQL INSERT
+ Seq((3L, "hr")).toDF("id",
"dep").writeTo("testcat.table_name").overwrite($"dep" === "hr")
Review Comment:
@peter-toth, this PR landed first, so I added the case to #60380. The
SPARK-61504 test in `DataFrameWriterV2Suite` now uses a `testv2filter` table
with `accept-char-read-side-padding` and a row stored as `hr` without padding.
`DataFrameWriterV2.overwrite($"dep" === "hr")` replaces both that row and the
padded one.
--
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]