Skip to content

Commit

Permalink
remove comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Weijun-H committed Jun 16, 2023
1 parent e9e8817 commit 8981e08
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions datafusion/expr/src/built_in_function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,7 @@ impl BuiltinScalarFunction {
BuiltinScalarFunction::Concat => Ok(Utf8),
BuiltinScalarFunction::ConcatWithSeparator => Ok(Utf8),
BuiltinScalarFunction::DatePart => Ok(Float64),
// DateTrunc always makes nanosecond timestamps
BuiltinScalarFunction::DateTrunc | BuiltinScalarFunction::DateBin => {
BuiltinScalarFunction::DateBin | BuiltinScalarFunction::DateTrunc => {
match input_expr_types[1] {
Timestamp(Nanosecond, _) | Utf8 => Ok(Timestamp(Nanosecond, None)),
Timestamp(Microsecond, _) => Ok(Timestamp(Microsecond, None)),
Expand Down
3 changes: 1 addition & 2 deletions datafusion/physical-expr/src/datetime_expressions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -396,9 +396,8 @@ pub fn date_trunc(args: &[ColumnarValue]) -> Result<ColumnarValue> {
}
}
_ => {
println!("{}, {:?}", granularity, array);
return Err(DataFusionError::Execution(
"second argument of `date_trunc` must be nanosecond timestamp scalar or array array".to_string(),
"second argument of `date_trunc` must be nanosecond timestamp scalar or array".to_string(),
));
}
})
Expand Down

0 comments on commit 8981e08

Please sign in to comment.