We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Submitted by: @pcisar
Here is reproducible test:
create table test_table_01 ( id int, get_temp_i computed by ((cast (64 as int))), fld2 int ); commit; insert into test_table_01 (id, fld2) values (1, 1); commit;
select * from test_01;
ID GET\_TEMP\_I FLD2
============ ============= ============ 1 64 1
select get_temp_i+1 from test_01;
ADD
===================== 65
select case get_temp_i when (get_temp_i = 1) then 1 else 2 end as case_result from test_table_01;
Statement failed, SQLSTATE = 22018 conversion error from string "64"
The text was updated successfully, but these errors were encountered:
assignee: Adriano dos Santos Fernandes [ asfernandes ]
Sorry, something went wrong.
Commented by: @asfernandes
The engine behavior is correct and your test case is wrong.
You want
select case get_temp_i when 1 then 1 else 2 end as case_result from test_table_01;
or
select case when get_temp_i = 1 then 1 else 2 end as case_result from test_table_01;
but are doing the equivalente of
select case get_temp_i when false then 1 else 2 end as case_result from test_table_01;
status: Open [ 1 ] => Resolved [ 5 ]
resolution: Won't Fix [ 2 ]
status: Resolved [ 5 ] => Closed [ 6 ]
asfernandes
No branches or pull requests
Submitted by: @pcisar
Here is reproducible test:
create table test_table_01 (
id int,
get_temp_i computed by ((cast (64 as int))),
fld2 int
);
commit;
insert into test_table_01 (id, fld2) values (1, 1);
commit;
select * from test_01;
============ ============= ============
1 64 1
select get_temp_i+1 from test_01;
=====================
65
select
case get_temp_i
when (get_temp_i = 1) then 1
else 2
end as case_result
from test_table_01;
CASE_RESULT
Statement failed, SQLSTATE = 22018
conversion error from string "64"
The text was updated successfully, but these errors were encountered: