alamb commented on a change in pull request #8340:
URL: https://github.com/apache/arrow/pull/8340#discussion_r500443182
##########
File path: rust/datafusion/src/logical_plan/mod.rs
##########
@@ -323,21 +322,19 @@ impl Expr {
///
/// # Errors
///
- /// This function errors when it is impossible to cast the expression to
the target [arrow::datatypes::DataType].
+ /// Currently no errors happen at plan time. If it is impossible
+ /// to cast the expression to the target
+ /// [arrow::datatypes::DataType] then an error will occur at
+ /// runtime.
pub fn cast_to(&self, cast_to_type: &DataType, schema: &Schema) ->
Result<Expr> {
let this_type = self.get_type(schema)?;
if this_type == *cast_to_type {
Ok(self.clone())
- } else if can_coerce_from(cast_to_type, &this_type) {
Review comment:
The PR itself is pretty simple -- it just deletes code :)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]