Jefffrey commented on code in PR #18317:
URL: https://github.com/apache/datafusion/pull/18317#discussion_r2476768049
##########
datafusion/functions-nested/src/range.rs:
##########
@@ -378,44 +420,45 @@ impl Range {
fn gen_range_timestamp(&self, args: &[ArrayRef]) -> Result<ArrayRef> {
let [start, stop, step] = take_function_args(self.name(), args)?;
+ let step = as_interval_mdn_array(step)?;
+
+ // Signature can only guarantee we get a timestamp type, not
specifically
+ // timestamp(ns) so handle potential cast from other timestamps here.
+ fn cast_to_ns(arr: &ArrayRef) -> Result<ArrayRef> {
Review Comment:
Yeah it's to cast from potentially other timestamp time units down to native
##########
datafusion/functions-nested/src/range.rs:
##########
@@ -378,44 +420,45 @@ impl Range {
fn gen_range_timestamp(&self, args: &[ArrayRef]) -> Result<ArrayRef> {
let [start, stop, step] = take_function_args(self.name(), args)?;
+ let step = as_interval_mdn_array(step)?;
+
+ // Signature can only guarantee we get a timestamp type, not
specifically
+ // timestamp(ns) so handle potential cast from other timestamps here.
+ fn cast_to_ns(arr: &ArrayRef) -> Result<ArrayRef> {
Review Comment:
Yeah it's to cast from potentially other timestamp time units down to
nanoseconds
--
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]