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
CREATE TABLE t1(c0FLOAT DOUBLE NOT NULL);
INSERT INTO t1(c0float) VALUES (0.17081978917121887);
SELECT SUM(count) FROM (SELECT (((0.9505856037139893 NOT BETWEEN 0.7793450355529785 AND 9.69433728E8) IS NOT NULL AND (0.9505856037139893 NOT BETWEEN 0.7793450355529785 AND 9.69433728E8)) ::BIGINT)as count FROM t1) as res;
resulted in a decimal overflow error:
Decimal overflow at line : 906 while evaluating function `to_decimal(25, 16)(969433728)`
But I do not quite understand why there is a function to_decimal(25, 16), and why the values here are 25 and 16.
I think it would be helpful to further reduce the test case to figure out what causes the conversion (e.g., is it the cast to BIGINT?). @hanyisong, do you have any feedback on this?
I am investigating the CI error of databend.
It seems that this line of SQL:
resulted in a decimal overflow error:
But I do not quite understand why there is a function
to_decimal(25, 16)
, and why the values here are 25 and 16.The column
c0
of tablet1
is of typefloat
, and according to https://docs.databend.com/sql/sql-reference/data-types/data-type-numeric-types/#floating-point-data-types, we actually can store the value9.69433728E8
inc0
oft1
But I looked up the documentation of Databend: https://databend.rs/doc/sql-reference/data-types/data-type-decimal-types I found that our value of
9.69433728E8
actually exceeds its limit ofto_decimal(25, 16)
.So I am confused if there is a bug in Databend, or there is a bug in SQLancer?
The full log: https://github.com/ZhengLin-Li/sqlancer/actions/runs/5053760996/jobs/9067927554
The text was updated successfully, but these errors were encountered: