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
{{ message }}
Repository navigation
Regression: group by count distinct doesn't work for timestamps with time zone #10042
I didn't check in which version it regressed, but it worked in v34 and is broken in v37.
It looks like the regression was caused by the specialization of the DistinctCount implementation of AggregateExpr.
To Reproduce
createtablet_sourceasvalues
('2018-11-13T17:11:10.011375885995', 'Row 0', 'X'),
('2011-12-13T11:13:10.12345', 'Row 1', 'X'),
(null, 'Row 2', 'Y'),
('2021-01-01T05:11:10.432', 'Row 3', 'Y');
createtabletasselect
arrow_cast(column1, 'Timestamp(Second, Some("UTC"))') as secs_utc,
column2 as names,
column3 as tag
from t_source;
SELECT tag, count(DISTINCT secs_utc) FROM t GROUP BY tag ORDER BY tag;
Expected behavior
It should work. The error we get is:
External error: query failed: DataFusion error: External error: External error: Arrow error: Invalid argument error: column types must match schema types, expected List(Field { name: "item", data_type: Timestamp(Second, Some("UTC")), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) but found List(Field { name: "item", data_type: Timestamp(Second, None), nullable: true, dict_id: 0, dict_is_ordered: false, metadata: {} }) at column index 1
Activity