Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

transform does not work with DateTime64 #32387

Closed
darkleaf opened this issue Dec 8, 2021 · 1 comment · Fixed by #51351
Closed

transform does not work with DateTime64 #32387

darkleaf opened this issue Dec 8, 2021 · 1 comment · Fixed by #51351
Assignees
Labels
comp-datetime date & time & timezone related comp-functions Relates to some SQL function unexpected behaviour

Comments

@darkleaf
Copy link

darkleaf commented Dec 8, 2021

select transform('a', ['a', 'b'], [toDateTime64(1,3), toDateTime64(2,3)], toDateTime64(0,3));

Received exception from server (version 21.11.5):
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Illegal column String of elements of array of second argument of function transform: While processing transform('a', ['a', 'b'], [toDateTime64(1, 3), toDateTime64(2, 3)], toDateTime64(0, 3)). (ILLEGAL_COLUMN)
select transform('a', ['a', 'b'], [toDateTime(1), toDateTime(2)], toDateTime(0));

┌─transform('a', ['a', 'b'], array(toDateTime(1), toDateTime(2)), toDateTime(0))─┐
│                                                            1970-01-01 00:00:01 │
└────────────────────────────────────────────────────────────────────────────────┘

I expect it returns toDateTime64(1,3) like for DateTime but it fails.

Clickhouse version is 21.11.5.33.

@darkleaf darkleaf added the potential bug To be reviewed by developers and confirmed/rejected. label Dec 8, 2021
@vdimir vdimir added comp-datetime date & time & timezone related comp-functions Relates to some SQL function unexpected behaviour and removed potential bug To be reviewed by developers and confirmed/rejected. labels Dec 8, 2021
@vdimir
Copy link
Member

vdimir commented Dec 8, 2021

Need to support this type like in #31839

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-datetime date & time & timezone related comp-functions Relates to some SQL function unexpected behaviour
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants