This is an automated email from the ASF dual-hosted git repository.

lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git


The following commit(s) were added to refs/heads/master by this push:
     new 949a06d1bb [test] Add timestamp partition column test (#7091)
949a06d1bb is described below

commit 949a06d1bbdf21ecdc92e01dce4c04bffb8c183f
Author: Zouxxyy <[email protected]>
AuthorDate: Wed Jan 21 13:30:19 2026 +0800

    [test] Add timestamp partition column test (#7091)
---
 .../spark/sql/PaimonPartitionManagementTest.scala  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git 
a/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/PaimonPartitionManagementTest.scala
 
b/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/PaimonPartitionManagementTest.scala
index 6a279be424..3acb318084 100644
--- 
a/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/PaimonPartitionManagementTest.scala
+++ 
b/paimon-spark/paimon-spark-ut/src/test/scala/org/apache/paimon/spark/sql/PaimonPartitionManagementTest.scala
@@ -210,4 +210,28 @@ class PaimonPartitionManagementTest extends 
PaimonSparkTestBase {
       Row("dt=20240601") :: Nil
     )
   }
+
+  test("Paimon Partition Management: timestamp partition column") {
+    spark.sql(s"""
+                 |CREATE TABLE T (a INT, dt TIMESTAMP)
+                 |PARTITIONED BY (dt)
+                 |""".stripMargin)
+
+    spark.sql("INSERT INTO T VALUES (1, CAST('2024-06-01 10:30:01' AS 
TIMESTAMP))")
+    spark.sql("INSERT INTO T VALUES (2, CAST('2024-06-02 15:45:30' AS 
TIMESTAMP))")
+
+    checkAnswer(
+      spark.sql("SHOW PARTITIONS T"),
+      Seq(
+        Row("dt=2024-06-01 10%3A30%3A01"),
+        Row("dt=2024-06-02 15%3A45%3A30")
+      )
+    )
+
+    checkAnswer(
+      spark.sql("SELECT * FROM T ORDER BY dt"),
+      spark.sql(
+        "SELECT 1 AS a, CAST('2024-06-01 10:30:01' AS TIMESTAMP) AS dt UNION 
ALL SELECT 2, CAST('2024-06-02 15:45:30' AS TIMESTAMP) ORDER BY dt")
+    )
+  }
 }

Reply via email to