You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "jackwener (via GitHub)" <gi...@apache.org> on 2023/06/09 14:01:07 UTC

[GitHub] [arrow-datafusion] jackwener commented on a diff in pull request #6614: fix: remove type coercion of case expression in Expr::Schema

jackwener commented on code in PR #6614:
URL: https://github.com/apache/arrow-datafusion/pull/6614#discussion_r1224350123


##########
datafusion/core/tests/sqllogictests/test_files/scalar.slt:
##########
@@ -646,27 +646,27 @@ SELECT CASE WHEN NULL THEN 'foo' ELSE 'bar' END
 bar
 
 # case_expr_with_null()
-query I
+query ?

Review Comment:
   It's strange. I can't understand it.
   
   I exec sql to confirm `type coercion` is right
   
   ```sql
    select arrow_typeof(case when b is null then null else b end) from (select a,b from (values (1,null),(2,3)) as t (a,b)) a;
   
   +------------------------------------------------------------+
   | arrow_typeof(CASE WHEN a.b IS NULL THEN NULL ELSE a.b END) |
   +------------------------------------------------------------+
   | Int64                                                      |
   | Int64                                                      |
   +------------------------------------------------------------+
   ```



-- 
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