You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Jefffrey (via GitHub)" <gi...@apache.org> on 2023/04/03 12:18:23 UTC

[GitHub] [arrow-datafusion] Jefffrey commented on a diff in pull request #5820: fix: Enhance case expression type coercion

Jefffrey commented on code in PR #5820:
URL: https://github.com/apache/arrow-datafusion/pull/5820#discussion_r1155883225


##########
datafusion/core/tests/sqllogictests/test_files/select.slt:
##########
@@ -214,3 +214,9 @@ select * from (select 1 a union all select 2) b order by a limit null;
 query I
 select * from (select 1 a union all select 2) b order by a limit 0;
 ----
+
+# select case when type coercion
+query I
+select CASE 10.5 WHEN 0 THEN 1 ELSE 10 END as col;
+----
+10

Review Comment:
   Testing with sqllogictests turned out to be kinda finicky, as this PR is meant to enhance the type coercion, but not actually testing the actual casting itself (since some of those negative cases would pass the type coercion but fail at execution time due to actual contents of the data). So I figured it'd be easier to add more tests as unit tests for proper testing.



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