wombatu-kun commented on code in PR #20544:
URL: https://github.com/apache/hudi/pull/20544#discussion_r4511301427
##########
hudi-spark-datasource/hudi-spark/src/test/scala/org/apache/spark/sql/hudi/dml/others/TestUpdateTable.scala:
##########
@@ -34,6 +34,59 @@ import org.junit.jupiter.api.Assertions.assertEquals
class TestUpdateTable extends HoodieSparkSqlTestBase {
+ // (ordering field type, older literal, newer literal, older value as
string, newer value as string)
+ private val logicalTypeOrderingCases = Seq(
+ ("timestamp", "timestamp'2026-10-01 00:00:00'", "timestamp'2026-10-02
00:00:00'",
+ "2026-10-01 00:00:00", "2026-10-02 00:00:00"),
+ ("date", "date'2026-10-01'", "date'2026-10-02'", "2026-10-01",
"2026-10-02"),
+ ("decimal(10,2)", "cast(1.50 as decimal(10,2))", "cast(2.50 as
decimal(10,2))", "1.50", "2.50"))
+
+ logicalTypeOrderingCases.foreach { case (orderingType, oldLiteral,
newLiteral, oldStr, newStr) =>
+ test(s"Test Update Table With ${orderingType.toUpperCase} Ordering Field")
{
+ withTempDir { tmp =>
+ Seq("cow", "mor").foreach { tableType =>
Review Comment:
The MOR and `partitioned` legs don't seem to reach the Avro merge path this
fixes, since an update-only MOR batch goes to the append handle and the read
back merges through the Spark context. Could the matrix shrink to COW with both
optimized-writes settings, two table lifecycles per type instead of eight?
--
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]