You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: datafusion/core/tests/sqllogictests/test_files/aggregate.slt
+115
Original file line number
Diff line number
Diff line change
@@ -1889,6 +1889,121 @@ drop table t_source;
1889
1889
statement ok
1890
1890
drop table t;
1891
1891
1892
+
1893
+
# aggregates on strings
1894
+
statement ok
1895
+
create table t_source
1896
+
as values
1897
+
('Foo', 1),
1898
+
('Bar', 2),
1899
+
(null, 2),
1900
+
('Baz', 1);
1901
+
1902
+
statement ok
1903
+
create table t as
1904
+
select
1905
+
arrow_cast(column1, 'Utf8') as utf8,
1906
+
arrow_cast(column1, 'LargeUtf8') as largeutf8,
1907
+
column2 as tag
1908
+
from t_source;
1909
+
1910
+
# No groupy
1911
+
query TTITTI
1912
+
SELECT
1913
+
min(utf8),
1914
+
max(utf8),
1915
+
count(utf8),
1916
+
min(largeutf8),
1917
+
max(largeutf8),
1918
+
count(largeutf8)
1919
+
FROM t
1920
+
----
1921
+
Bar Foo 3 Bar Foo 3
1922
+
1923
+
1924
+
# with groupby
1925
+
query TTITTI
1926
+
SELECT
1927
+
min(utf8),
1928
+
max(utf8),
1929
+
count(utf8),
1930
+
min(largeutf8),
1931
+
max(largeutf8),
1932
+
count(largeutf8)
1933
+
FROM t
1934
+
GROUP BY tag
1935
+
ORDER BY tag
1936
+
----
1937
+
Baz Foo 2 Baz Foo 2
1938
+
Bar Bar 1 Bar Bar 1
1939
+
1940
+
1941
+
statement ok
1942
+
drop table t_source;
1943
+
1944
+
statement ok
1945
+
drop table t;
1946
+
1947
+
1948
+
# aggregates on binary
1949
+
statement ok
1950
+
create table t_source
1951
+
as values
1952
+
('Foo', 1),
1953
+
('Bar', 2),
1954
+
(null, 2),
1955
+
('Baz', 1);
1956
+
1957
+
statement ok
1958
+
create table t as
1959
+
select
1960
+
arrow_cast(column1, 'Binary') as binary,
1961
+
arrow_cast(column1, 'LargeBinary') as largebinary,
1962
+
column2 as tag
1963
+
from t_source;
1964
+
1965
+
# No groupy
1966
+
query error DataFusion error: Internal error: Min/Max accumulator not implemented for type Binary\. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
1967
+
SELECT
1968
+
min(binary),
1969
+
max(binary),
1970
+
count(binary),
1971
+
min(largebinary),
1972
+
max(largebinary),
1973
+
count(largebinary)
1974
+
FROM t
1975
+
1976
+
1977
+
# with groupby
1978
+
query error DataFusion error: External error: Internal error: Min/Max accumulator not implemented for type Binary\. This was likely caused by a bug in DataFusion's code and we would welcome that you file an bug report in our issue tracker
0 commit comments