This is an automated email from the ASF dual-hosted git repository.
korlov pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 9a60ba374a2 IGNITE-26242 Sql. Time. Add test to make sure intermediate
CAST operation doesn't lead to unexpected result (#7392)
9a60ba374a2 is described below
commit 9a60ba374a2d3a0736222b21e8c535526be0fbc0
Author: korlov42 <[email protected]>
AuthorDate: Tue Jan 13 15:30:01 2026 +0200
IGNITE-26242 Sql. Time. Add test to make sure intermediate CAST operation
doesn't lead to unexpected result (#7392)
---
.../sql/group1/types/time/time_parsing.test | 14 ++++++++++----
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git
a/modules/sql-engine/src/integrationTest/sql/group1/types/time/time_parsing.test
b/modules/sql-engine/src/integrationTest/sql/group1/types/time/time_parsing.test
index 3b212b47b49..f1b9fdbdae1 100644
---
a/modules/sql-engine/src/integrationTest/sql/group1/types/time/time_parsing.test
+++
b/modules/sql-engine/src/integrationTest/sql/group1/types/time/time_parsing.test
@@ -95,18 +95,24 @@ SELECT '1:01:-01'::TIME
statement error: Invalid TIME value, '1:10:-01'
SELECT '1:10:-01'::TIME
-query I
+query T
SELECT '14:42:04'::TIME::VARCHAR
----
14:42:04
-# trailing zeros get truncated
-query I
+# sub-second digits is truncated due to default precision (which is 0)
+query T
SELECT '14:42:04.000000'::TIME::VARCHAR
----
14:42:04
-query I
+query T
SELECT '14:42:04.500'::TIME(3)::VARCHAR
----
14:42:04.500
+
+# trailing zeros appended when necessary
+query TTT
+SELECT '14:42:04.1'::TIME(3)::VARCHAR, '14:42:04.1'::TIME(2)::VARCHAR,
'14:42:04.1'::TIME(1)::VARCHAR
+----
+14:42:04.100 14:42:04.10 14:42:04.1