@@ -1933,6 +1933,41 @@ emp_no:long | hire_date:date_nanos | yr:date_nanos | mo:date_nano
1933193310002 | 1985-11-21T00:00:00.000Z | 1985-01-01T00:00:00.000Z | 1985-11-01T00:00:00.000Z
19341934;
19351935
1936+ MultiTypedDateTruncStatsBy
1937+ required_capability: implicit_casting_union_typed_numeric_and_date
1938+
1939+ FROM employees, employees_incompatible
1940+ | STATS c = count(emp_no) BY yr = DATE_TRUNC(1 year, hire_date)
1941+ | SORT yr DESC
1942+ | LIMIT 5
1943+ ;
1944+
1945+ c:long | yr:date_nanos
1946+ 2 | 1999-01-01T00:00:00.000Z
1947+ 2 | 1997-01-01T00:00:00.000Z
1948+ 2 | 1996-01-01T00:00:00.000Z
1949+ 10 | 1995-01-01T00:00:00.000Z
1950+ 8 | 1994-01-01T00:00:00.000Z
1951+ ;
1952+
1953+ MultiTypedDateTruncStatsByWithEval
1954+ required_capability: implicit_casting_union_typed_numeric_and_date
1955+
1956+ FROM employees, employees_incompatible
1957+ | EVAL yr = DATE_TRUNC(1 year, hire_date)
1958+ | STATS c = count(emp_no) BY yr
1959+ | SORT yr DESC
1960+ | LIMIT 5
1961+ ;
1962+
1963+ c:long | yr:date_nanos
1964+ 2 | 1999-01-01T00:00:00.000Z
1965+ 2 | 1997-01-01T00:00:00.000Z
1966+ 2 | 1996-01-01T00:00:00.000Z
1967+ 10 | 1995-01-01T00:00:00.000Z
1968+ 8 | 1994-01-01T00:00:00.000Z
1969+ ;
1970+
19361971MultiTypedBucketDateNanosByYear
19371972required_capability: implicit_casting_union_typed_numeric_and_date
19381973
@@ -1983,6 +2018,55 @@ c:long | mo:date_nanos
1983201822 | 1985-01-01T00:00:00.000Z
19842019;
19852020
2021+ MultiTypedBucketDateNanosInBothStatsAndBy
2022+ required_capability: implicit_casting_union_typed_numeric_and_date
2023+
2024+ FROM employees, employees_incompatible
2025+ | STATS c = count(*), b = BUCKET(hire_date, 1 year) + 1 year BY yr = BUCKET(hire_date, 1 year)
2026+ | SORT yr DESC, c
2027+ ;
2028+
2029+ c:long | b:date_nanos | yr:date_nanos
2030+ 2 | 2000-01-01T00:00:00.000Z | 1999-01-01T00:00:00.000Z
2031+ 2 | 1998-01-01T00:00:00.000Z | 1997-01-01T00:00:00.000Z
2032+ 2 | 1997-01-01T00:00:00.000Z | 1996-01-01T00:00:00.000Z
2033+ 10 | 1996-01-01T00:00:00.000Z | 1995-01-01T00:00:00.000Z
2034+ 8 | 1995-01-01T00:00:00.000Z | 1994-01-01T00:00:00.000Z
2035+ 6 | 1994-01-01T00:00:00.000Z | 1993-01-01T00:00:00.000Z
2036+ 16 | 1993-01-01T00:00:00.000Z | 1992-01-01T00:00:00.000Z
2037+ 12 | 1992-01-01T00:00:00.000Z | 1991-01-01T00:00:00.000Z
2038+ 24 | 1991-01-01T00:00:00.000Z | 1990-01-01T00:00:00.000Z
2039+ 26 | 1990-01-01T00:00:00.000Z | 1989-01-01T00:00:00.000Z
2040+ 18 | 1989-01-01T00:00:00.000Z | 1988-01-01T00:00:00.000Z
2041+ 30 | 1988-01-01T00:00:00.000Z | 1987-01-01T00:00:00.000Z
2042+ 22 | 1987-01-01T00:00:00.000Z | 1986-01-01T00:00:00.000Z
2043+ 22 | 1986-01-01T00:00:00.000Z | 1985-01-01T00:00:00.000Z
2044+ ;
2045+
2046+ MultiTypedBucketDateNanosInBothStatsAndByWithAlias
2047+ required_capability: implicit_casting_union_typed_numeric_and_date
2048+
2049+ FROM employees, employees_incompatible
2050+ | STATS c = count(*), b = yr + 1 year BY yr = BUCKET(hire_date, 1 year)
2051+ | SORT yr DESC, c
2052+ ;
2053+
2054+ c:long | b:date_nanos | yr:date_nanos
2055+ 2 | 2000-01-01T00:00:00.000Z | 1999-01-01T00:00:00.000Z
2056+ 2 | 1998-01-01T00:00:00.000Z | 1997-01-01T00:00:00.000Z
2057+ 2 | 1997-01-01T00:00:00.000Z | 1996-01-01T00:00:00.000Z
2058+ 10 | 1996-01-01T00:00:00.000Z | 1995-01-01T00:00:00.000Z
2059+ 8 | 1995-01-01T00:00:00.000Z | 1994-01-01T00:00:00.000Z
2060+ 6 | 1994-01-01T00:00:00.000Z | 1993-01-01T00:00:00.000Z
2061+ 16 | 1993-01-01T00:00:00.000Z | 1992-01-01T00:00:00.000Z
2062+ 12 | 1992-01-01T00:00:00.000Z | 1991-01-01T00:00:00.000Z
2063+ 24 | 1991-01-01T00:00:00.000Z | 1990-01-01T00:00:00.000Z
2064+ 26 | 1990-01-01T00:00:00.000Z | 1989-01-01T00:00:00.000Z
2065+ 18 | 1989-01-01T00:00:00.000Z | 1988-01-01T00:00:00.000Z
2066+ 30 | 1988-01-01T00:00:00.000Z | 1987-01-01T00:00:00.000Z
2067+ 22 | 1987-01-01T00:00:00.000Z | 1986-01-01T00:00:00.000Z
2068+ 22 | 1986-01-01T00:00:00.000Z | 1985-01-01T00:00:00.000Z
2069+ ;
19862070
19872071MultiTypedEnrichOnNumericField
19882072required_capability: enrich_load
0 commit comments