You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/06/30 00:22:40 UTC

[GitHub] [arrow-datafusion] alamb commented on a diff in pull request #2810: use non-null then result data type as return type for CaseExpr

alamb commented on code in PR #2810:
URL: https://github.com/apache/arrow-datafusion/pull/2810#discussion_r910506837


##########
datafusion/physical-expr/src/expressions/case.rs:
##########
@@ -117,7 +117,7 @@ impl CaseExpr {
     ///     [ELSE result]
     /// END
     fn case_when_with_expr(&self, batch: &RecordBatch) -> Result<ColumnarValue> {
-        let return_type = self.when_then_expr[0].1.data_type(&batch.schema())?;
+        let return_type = self.data_type(&*batch.schema())?;

Review Comment:
   👍 



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org