aboutsummaryrefslogtreecommitdiffstats
path: root/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql
diff options
context:
space:
mode:
authorAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
committerAlexander Smirnov <alex@ydb.tech>2024-11-20 11:14:58 +0000
commit31773f157bf8164364649b5f470f52dece0a4317 (patch)
tree33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql
parent2c7938962d8689e175574fc1e817c05049f27905 (diff)
parenteff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff)
downloadydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql')
-rw-r--r--yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql332
1 files changed, 332 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql
new file mode 100644
index 0000000000..b390aab2ec
--- /dev/null
+++ b/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql
@@ -0,0 +1,332 @@
+USE plato;
+pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps";
+
+SELECT
+ Date("2000-01-01") > na,
+ Date("2000-01-01") > naz,
+ Date("2000-01-01") > nd,
+ Date("2000-01-01") > ndz,
+ Date("2000-01-01") > nt,
+ Date("2000-01-01") > ntz,
+ Date("2000-01-01") > wa,
+ Date("2000-01-01") > wd,
+ Date("2000-01-01") > wt,
+ Date("2000-01-01") > waz,
+ Date("2000-01-01") > wdz,
+ Date("2000-01-01") > wtz,
+
+ TzDate("2000-01-01,Europe/Moscow") > na,
+ TzDate("2000-01-01,Europe/Moscow") > naz,
+ TzDate("2000-01-01,Europe/Moscow") > nd,
+ TzDate("2000-01-01,Europe/Moscow") > ndz,
+ TzDate("2000-01-01,Europe/Moscow") > nt,
+ TzDate("2000-01-01,Europe/Moscow") > ntz,
+ TzDate("2000-01-01,Europe/Moscow") > wa,
+ TzDate("2000-01-01,Europe/Moscow") > wd,
+ TzDate("2000-01-01,Europe/Moscow") > wt,
+ TzDate("2000-01-01,Europe/Moscow") > waz,
+ TzDate("2000-01-01,Europe/Moscow") > wdz,
+ TzDate("2000-01-01,Europe/Moscow") > wtz,
+
+ Datetime("2000-01-01T03:04:05Z") > na,
+ Datetime("2000-01-01T03:04:05Z") > naz,
+ Datetime("2000-01-01T03:04:05Z") > nd,
+ Datetime("2000-01-01T03:04:05Z") > ndz,
+ Datetime("2000-01-01T03:04:05Z") > nt,
+ Datetime("2000-01-01T03:04:05Z") > ntz,
+ Datetime("2000-01-01T03:04:05Z") > wa,
+ Datetime("2000-01-01T03:04:05Z") > wd,
+ Datetime("2000-01-01T03:04:05Z") > wt,
+ Datetime("2000-01-01T03:04:05Z") > waz,
+ Datetime("2000-01-01T03:04:05Z") > wdz,
+ Datetime("2000-01-01T03:04:05Z") > wtz,
+
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > na,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > naz,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > nd,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > ndz,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > nt,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > ntz,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wa,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wd,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wt,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > waz,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wdz,
+ TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wtz,
+
+ Timestamp("2000-01-01T03:04:05.678912Z") > na,
+ Timestamp("2000-01-01T03:04:05.678912Z") > naz,
+ Timestamp("2000-01-01T03:04:05.678912Z") > nd,
+ Timestamp("2000-01-01T03:04:05.678912Z") > ndz,
+ Timestamp("2000-01-01T03:04:05.678912Z") > nt,
+ Timestamp("2000-01-01T03:04:05.678912Z") > ntz,
+ Timestamp("2000-01-01T03:04:05.678912Z") > wa,
+ Timestamp("2000-01-01T03:04:05.678912Z") > wd,
+ Timestamp("2000-01-01T03:04:05.678912Z") > wt,
+ Timestamp("2000-01-01T03:04:05.678912Z") > waz,
+ Timestamp("2000-01-01T03:04:05.678912Z") > wdz,
+ Timestamp("2000-01-01T03:04:05.678912Z") > wtz,
+
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > na,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > naz,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > nd,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > ndz,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > nt,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > ntz,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wa,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wd,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wt,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > waz,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wdz,
+ TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wtz
+FROM Dates;
+
+SELECT
+ Date32("1900-01-01") > na,
+ Date32("1900-01-01") > naz,
+ Date32("1900-01-01") > nd,
+ Date32("1900-01-01") > ndz,
+ Date32("1900-01-01") > nt,
+ Date32("1900-01-01") > ntz,
+ Date32("1900-01-01") > wa,
+ Date32("1900-01-01") > wd,
+ Date32("1900-01-01") > wt,
+ Date32("1900-01-01") > waz,
+ Date32("1900-01-01") > wdz,
+ Date32("1900-01-01") > wtz,
+
+ Datetime64("1900-01-01T03:04:05Z") > na,
+ Datetime64("1900-01-01T03:04:05Z") > naz,
+ Datetime64("1900-01-01T03:04:05Z") > nd,
+ Datetime64("1900-01-01T03:04:05Z") > ndz,
+ Datetime64("1900-01-01T03:04:05Z") > nt,
+ Datetime64("1900-01-01T03:04:05Z") > ntz,
+ Datetime64("1900-01-01T03:04:05Z") > wa,
+ Datetime64("1900-01-01T03:04:05Z") > wd,
+ Datetime64("1900-01-01T03:04:05Z") > wt,
+ Datetime64("1900-01-01T03:04:05Z") > waz,
+ Datetime64("1900-01-01T03:04:05Z") > wdz,
+ Datetime64("1900-01-01T03:04:05Z") > wtz,
+
+ Timestamp64("1900-01-01T03:04:05.678912Z") > na,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > naz,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > nd,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > ndz,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > nt,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > ntz,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > wa,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > wd,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > wt,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > waz,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > wdz,
+ Timestamp64("1900-01-01T03:04:05.678912Z") > wtz,
+
+ TzDate32("1900-01-01,Europe/Moscow") > na,
+ TzDate32("1900-01-01,Europe/Moscow") > naz,
+ TzDate32("1900-01-01,Europe/Moscow") > nd,
+ TzDate32("1900-01-01,Europe/Moscow") > ndz,
+ TzDate32("1900-01-01,Europe/Moscow") > nt,
+ TzDate32("1900-01-01,Europe/Moscow") > ntz,
+ TzDate32("1900-01-01,Europe/Moscow") > wa,
+ TzDate32("1900-01-01,Europe/Moscow") > wd,
+ TzDate32("1900-01-01,Europe/Moscow") > wt,
+ TzDate32("1900-01-01,Europe/Moscow") > waz,
+ TzDate32("1900-01-01,Europe/Moscow") > wdz,
+ TzDate32("1900-01-01,Europe/Moscow") > wtz,
+
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > na,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > naz,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > nd,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > ndz,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > nt,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > ntz,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wa,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wd,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wt,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > waz,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wdz,
+ TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wtz,
+
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > na,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > naz,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > nd,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > ndz,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > nt,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > ntz,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wa,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wd,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wt,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > waz,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wdz,
+ TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wtz,
+
+ Interval("P1D") > ni,
+ Interval("P1D") > wi,
+ Interval64("P1D") > ni,
+ Interval64("P1D") > wi,
+FROM Dates;
+
+SELECT
+ na > Date("2000-01-01"),
+ naz > Date("2000-01-01"),
+ nd > Date("2000-01-01"),
+ ndz > Date("2000-01-01"),
+ nt > Date("2000-01-01"),
+ ntz > Date("2000-01-01"),
+ wa > Date("2000-01-01"),
+ wd > Date("2000-01-01"),
+ wt > Date("2000-01-01"),
+ waz > Date("2000-01-01"),
+ wdz > Date("2000-01-01"),
+ wtz > Date("2000-01-01"),
+
+ na > TzDate("2000-01-01,Europe/Moscow"),
+ naz > TzDate("2000-01-01,Europe/Moscow"),
+ nd > TzDate("2000-01-01,Europe/Moscow"),
+ ndz > TzDate("2000-01-01,Europe/Moscow"),
+ nt > TzDate("2000-01-01,Europe/Moscow"),
+ ntz > TzDate("2000-01-01,Europe/Moscow"),
+ wa > TzDate("2000-01-01,Europe/Moscow"),
+ wd > TzDate("2000-01-01,Europe/Moscow"),
+ wt > TzDate("2000-01-01,Europe/Moscow"),
+ waz > TzDate("2000-01-01,Europe/Moscow"),
+ wdz > TzDate("2000-01-01,Europe/Moscow"),
+ wtz > TzDate("2000-01-01,Europe/Moscow"),
+
+ na > Datetime("2000-01-01T03:04:05Z"),
+ naz > Datetime("2000-01-01T03:04:05Z"),
+ nd > Datetime("2000-01-01T03:04:05Z"),
+ ndz > Datetime("2000-01-01T03:04:05Z"),
+ nt > Datetime("2000-01-01T03:04:05Z"),
+ ntz > Datetime("2000-01-01T03:04:05Z"),
+ wa > Datetime("2000-01-01T03:04:05Z"),
+ wd > Datetime("2000-01-01T03:04:05Z"),
+ wt > Datetime("2000-01-01T03:04:05Z"),
+ waz > Datetime("2000-01-01T03:04:05Z"),
+ wdz > Datetime("2000-01-01T03:04:05Z"),
+ wtz > Datetime("2000-01-01T03:04:05Z"),
+
+ na > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ naz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ nd > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ ndz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ nt > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ ntz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ wa > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ wd > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ wt > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ waz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ wdz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+ wtz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"),
+
+ na > Timestamp("2000-01-01T03:04:05.678912Z"),
+ naz > Timestamp("2000-01-01T03:04:05.678912Z"),
+ nd > Timestamp("2000-01-01T03:04:05.678912Z"),
+ ndz > Timestamp("2000-01-01T03:04:05.678912Z"),
+ nt > Timestamp("2000-01-01T03:04:05.678912Z"),
+ ntz > Timestamp("2000-01-01T03:04:05.678912Z"),
+ wa > Timestamp("2000-01-01T03:04:05.678912Z"),
+ wd > Timestamp("2000-01-01T03:04:05.678912Z"),
+ wt > Timestamp("2000-01-01T03:04:05.678912Z"),
+ waz > Timestamp("2000-01-01T03:04:05.678912Z"),
+ wdz > Timestamp("2000-01-01T03:04:05.678912Z"),
+ wtz > Timestamp("2000-01-01T03:04:05.678912Z"),
+
+ na > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ naz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ nd > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ ndz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ nt > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ ntz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ wa > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ wd > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ wt > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ waz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ wdz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"),
+ wtz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow")
+FROM Dates;
+
+SELECT
+ na > Date32("1900-01-01"),
+ naz > Date32("1900-01-01"),
+ nd > Date32("1900-01-01"),
+ ndz > Date32("1900-01-01"),
+ nt > Date32("1900-01-01"),
+ ntz > Date32("1900-01-01"),
+ wa > Date32("1900-01-01"),
+ wd > Date32("1900-01-01"),
+ wt > Date32("1900-01-01"),
+ waz > Date32("1900-01-01"),
+ wdz > Date32("1900-01-01"),
+ wtz > Date32("1900-01-01"),
+
+ na > Datetime64("1900-01-01T03:04:05Z"),
+ naz > Datetime64("1900-01-01T03:04:05Z"),
+ nd > Datetime64("1900-01-01T03:04:05Z"),
+ ndz > Datetime64("1900-01-01T03:04:05Z"),
+ nt > Datetime64("1900-01-01T03:04:05Z"),
+ ntz > Datetime64("1900-01-01T03:04:05Z"),
+ wa > Datetime64("1900-01-01T03:04:05Z"),
+ wd > Datetime64("1900-01-01T03:04:05Z"),
+ wt > Datetime64("1900-01-01T03:04:05Z"),
+ waz > Datetime64("1900-01-01T03:04:05Z"),
+ wdz > Datetime64("1900-01-01T03:04:05Z"),
+ wtz > Datetime64("1900-01-01T03:04:05Z"),
+
+ na > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ naz > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ nd > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ ndz > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ nt > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ ntz > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ wa > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ wd > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ wt > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ waz > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ wdz > Timestamp64("1900-01-01T03:04:05.678912Z"),
+ wtz > Timestamp64("1900-01-01T03:04:05.678912Z"),
+
+ na > TzDate32("1900-01-01,Europe/Moscow"),
+ naz > TzDate32("1900-01-01,Europe/Moscow"),
+ nd > TzDate32("1900-01-01,Europe/Moscow"),
+ ndz > TzDate32("1900-01-01,Europe/Moscow"),
+ nt > TzDate32("1900-01-01,Europe/Moscow"),
+ ntz > TzDate32("1900-01-01,Europe/Moscow"),
+ wa > TzDate32("1900-01-01,Europe/Moscow"),
+ wd > TzDate32("1900-01-01,Europe/Moscow"),
+ wt > TzDate32("1900-01-01,Europe/Moscow"),
+ waz > TzDate32("1900-01-01,Europe/Moscow"),
+ wdz > TzDate32("1900-01-01,Europe/Moscow"),
+ wtz > TzDate32("1900-01-01,Europe/Moscow"),
+
+ na > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ naz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ nd > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ ndz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ nt > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ ntz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ wa > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ wd > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ wt > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ waz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ wdz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+ wtz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"),
+
+ na > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ naz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ nd > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ ndz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ nt > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ ntz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ wa > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ wd > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ wt > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ waz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ wdz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+ wtz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"),
+
+ ni > Interval("P1D"),
+ wi > Interval("P1D"),
+ ni > Interval64("P1D"),
+ wi > Interval64("P1D"),
+FROM Dates;