You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
❯ select case when 1=1 then true else 1 end;
+--------------------------------------------------------------------+
| CASE WHEN Int64(1) = Int64(1) THEN Boolean(true) ELSE Int64(1) END |
+--------------------------------------------------------------------+
| true |
+--------------------------------------------------------------------+
1 row in set. Query took 0.042 seconds.
❯ explain select case when 1=1 then true else 1 end;
+---------------+---------------------------------------------------------------------------------------------------+
| plan_type | plan |
+---------------+---------------------------------------------------------------------------------------------------+
| logical_plan | Projection: Boolean(true) AS CASE WHEN Int64(1) = Int64(1) THEN Boolean(true) ELSE Int64(1) END |
| | EmptyRelation |
| physical_plan | ProjectionExec: expr=[true as CASE WHEN Int64(1) = Int64(1) THEN Boolean(true) ELSE Int64(1) END] |
| | EmptyExec: produce_one_row=true |
| | |
+---------------+---------------------------------------------------------------------------------------------------+
2 rows in set. Query took 0.003 seconds.
❯ explain select case when 1>1 then true else 1 end;
+---------------+---------------------------------------------------------------------------------------------------+
| plan_type | plan |
+---------------+---------------------------------------------------------------------------------------------------+
| logical_plan | Projection: Boolean(true) AS CASE WHEN Int64(1) > Int64(1) THEN Boolean(true) ELSE Int64(1) END |
| | EmptyRelation |
| physical_plan | ProjectionExec: expr=[true as CASE WHEN Int64(1) > Int64(1) THEN Boolean(true) ELSE Int64(1) END] |
| | EmptyExec: produce_one_row=true |
| | |
+---------------+---------------------------------------------------------------------------------------------------+
2 rows in set. Query took 0.004 seconds.
❯ select case when 1>1 then true else 1 end;
+--------------------------------------------------------------------+
| CASE WHEN Int64(1) > Int64(1) THEN Boolean(true) ELSE Int64(1) END |
+--------------------------------------------------------------------+
| true |
+--------------------------------------------------------------------+
One case when sql has two diff result data type.
From other system, case when should have the common data type, but now the result type is the first non-null data type.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered:
Describe the bug
One case when sql has two diff result data type.
From other system, case when should have the common data type, but now the result type is the first non-null data type.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A clear and concise description of what you expected to happen.
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: