Consider timezones with UTC and +00:00 to be the same#10960
Consider timezones with UTC and +00:00 to be the same#10960alamb merged 8 commits intoapache:mainfrom
UTC and +00:00 to be the same#10960Conversation
|
I responded on #10957 (comment) |
+1 on including type coercion logic for "UTC" and "+00:00" and leaving the signature of NowFunc unchanged. This would fix the error described in #10957 more generally without introducing any breaking changes |
4c43bd4 to
e1cfb48
Compare
|
...perhaps someone can help me out on this. I still haven't found a way to create a timestamp with timezone in order to create a proper sqllogictest. |
There are some examples here: #10602 You can also use arrow_cast (there are some examples here https://datafusion.apache.org/user-guide/sql/scalar_functions.html#arrow-cast) |
|
I think this should be fixed now. I added some sqllogictest as well to validate the new behavior - thanks @alamb for the pointer on |
alamb
left a comment
There was a problem hiding this comment.
Thank you @marvinlanhenke and @samuelcolvin -- this looks good to me
cc @waitingkuo
|
I added some additional comments and merged up from main. @erratic-pattern if you have time, it would be great if you could review this PR as well |
UTC and +00:00 offsets are the same
UTC and +00:00 offsets are the sameUTC and +00:00 offsets are the same
UTC and +00:00 offsets are the sameUTC and +00:00 to be the same
UTC and +00:00 offsets are the sameUTC and +00:00 to be the same
|
Thanks everyone! |
* feat: add temporal_coercion check * fix: add return stmt * chore: add slts * fix: remove println * Update datafusion/expr/src/type_coercion/binary.rs --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* feat: add temporal_coercion check * fix: add return stmt * chore: add slts * fix: remove println * Update datafusion/expr/src/type_coercion/binary.rs --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* feat: add temporal_coercion check * fix: add return stmt * chore: add slts * fix: remove println * Update datafusion/expr/src/type_coercion/binary.rs --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* feat: add temporal_coercion check * fix: add return stmt * chore: add slts * fix: remove println * Update datafusion/expr/src/type_coercion/binary.rs --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
* feat: add temporal_coercion check * fix: add return stmt * chore: add slts * fix: remove println * Update datafusion/expr/src/type_coercion/binary.rs --------- Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
Which issue does this PR close?
Closes #10957.
Rationale for this change
Timezone was specified as "+00:00" instead of "UTC". This caused a missmatch in
temporal_coercion.What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?