Closed andy-123 closed 2 years ago
This select causes error:
select 1.0*1.0 from rdb$database
Error: *** IBPP::WrongType ***
Context: RowImpl::GetValue
Message: Incompatible types.
INT128 and double
also,
OK:
select -170141183460469231731687303715884105728 as int128min, 170141183460469231731687303715884105727 as int128max from rdb$database
Fail with same error:
select -17014118346046923173168730371588410572.7 as int128minfail, 17014118346046923173168730371588410572.7 as int128maxfail from rdb$database
Error: *** IBPP::WrongType ***
Context: RowImpl::GetValue
Message: Incompatible types.
INT128 and double
Thank you for reporting. I didn't notice it while testing. Fix is coming soon.
Should work now :)
Nice! I'll give a try tonight (2-3 hours from now) and generate a snapshot! Thanks
Almost!
Got error selecting decfloat
fields, can you take a loot at this?
Thanks!
select
--OK:
-170141183460469231731687303715884105728,
170141183460469231731687303715884105727,
-17014118346046923173168730371588410572.7,
17014118346046923173168730371588410572.7,
cast(1 as numeric(34)),
cast(1 as numeric(38)),
--Fail
cast(1 as decfloat),
cast(1 as decfloat(16)),
cast(1 as decfloat(34)) from rdb$database
Error: *** IBPP::LogicException ***
Context: RowImpl::AllocVariables
Message: Found an unknown sqltype !
Yes. Decfloat is not implemented yet. I will do that in this PR. Thanks for the merge.
FRInt128.cpp implements functions needed to work with int128. StringToInt128, Int128ToString and some others.
gcc build uses the buildin int128_t. msvc does not have some equivalent. so more work was needed (some overloads for int128)