Jefffrey commented on code in PR #19663:
URL: https://github.com/apache/datafusion/pull/19663#discussion_r2665149884
##########
datafusion/functions/src/datetime/to_timestamp.rs:
##########
@@ -380,13 +380,14 @@ impl ScalarUDFImpl for ToTimestampFunc {
let tz = self.timezone.clone();
match args[0].data_type() {
- Int32 | Int64 => args[0]
+ Int8 | Int16 | Int32 | Int64 | UInt8 | UInt16 | UInt32 | UInt64 =>
args[0]
.cast_to(&Timestamp(Second, None), None)?
.cast_to(&Timestamp(Nanosecond, tz), None),
Null | Timestamp(_, _) => args[0].cast_to(&Timestamp(Nanosecond,
tz), None),
- Float64 => {
+ Float32 | Float64 => {
Review Comment:
I think we should include Float16 whilst we're at it
##########
datafusion/functions/src/datetime/to_timestamp.rs:
##########
Review Comment:
I was checking the nearby code and found this oddity; we support only scalar
decimal128s? thats interesting 🤔
Might be worth correcting this so it works with array types too (like the
other arms) and expanding support to the other decimal types for completeness
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]