1
0
Fork 0

Merging upstream version 11.4.5.

Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
Daniel Baumann 2025-02-13 15:48:10 +01:00
parent 0a06643852
commit 88f99e1c27
Signed by: daniel
GPG key ID: FBB4F0E80A80222F
131 changed files with 53004 additions and 37079 deletions

View file

@ -246,6 +246,30 @@ class TestHive(Validator):
)
def test_time(self):
self.validate_all(
"(UNIX_TIMESTAMP(y) - UNIX_TIMESTAMP(x)) * 1000",
read={
"presto": "DATE_DIFF('millisecond', x, y)",
},
)
self.validate_all(
"UNIX_TIMESTAMP(y) - UNIX_TIMESTAMP(x)",
read={
"presto": "DATE_DIFF('second', x, y)",
},
)
self.validate_all(
"(UNIX_TIMESTAMP(y) - UNIX_TIMESTAMP(x)) / 60",
read={
"presto": "DATE_DIFF('minute', x, y)",
},
)
self.validate_all(
"(UNIX_TIMESTAMP(y) - UNIX_TIMESTAMP(x)) / 3600",
read={
"presto": "DATE_DIFF('hour', x, y)",
},
)
self.validate_all(
"DATEDIFF(a, b)",
write={