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

[GitHub] [arrow-datafusion] mslapek commented on issue #5733: Case statement with one branch being null gives "Mismatch between schema and batches"

mslapek commented on issue #5733:
URL: https://github.com/apache/arrow-datafusion/issues/5733#issuecomment-1484096507

   As a workaround you can add `CAST` to the first branch of `CASE`:
   
   ```sql
   CREATE TABLE aggregate_first_50_by_sql AS
   SELECT
       *,
       CASE
           WHEN c4 % 3 = 0 THEN CAST(NULL AS INT)
           ELSE c5
       END AS n5
   FROM aggregate_test_100_by_sql
   ```


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