You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "tustvold (via GitHub)" <gi...@apache.org> on 2023/07/04 08:07:35 UTC
[GitHub] [arrow-datafusion] tustvold commented on a diff in pull request #6818: fix: date_trunc support timezone
tustvold commented on code in PR #6818:
URL: https://github.com/apache/arrow-datafusion/pull/6818#discussion_r1251657851
##########
datafusion/expr/src/built_in_function.rs:
##########
@@ -895,15 +894,37 @@ impl BuiltinScalarFunction {
],
self.volatility(),
),
- BuiltinScalarFunction::DateTrunc => Signature::one_of(
- vec![
- Exact(vec![Utf8, Timestamp(Nanosecond, None)]),
- Exact(vec![Utf8, Timestamp(Microsecond, None)]),
- Exact(vec![Utf8, Timestamp(Millisecond, None)]),
- Exact(vec![Utf8, Timestamp(Second, None)]),
- ],
- self.volatility(),
- ),
+ BuiltinScalarFunction::DateTrunc => {
+ let time_zones = vec![
Review Comment:
FWIW this issue also arises for decimal types, I suspect that the current pattern of explicitly listing the possible type signatures is going to require revisiting. We probably want to extend the pattern established in #6778 and allow functions to return a signature given a set of input types.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org