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
{{ message }}
Repository navigation
Compute error: Overflow happened in tpcds_logical_q58 #5396
failed in expression "CAST(Int64(100) AS Decimal128(38, 38))"
This sounds like a type inference bug, as opposed to something related to the handling of decimal arithmetic. In particular where has this scale of 38 come from? Such a datatype cannot represent anything greater 1 and so the query is perfectly correct to bail out with an error.
The original schema has a precision of 2, as it represents a monetary quantity, and so ending up with a scale of 38 is extremely suspect...
Activity
jackwener commentedon Feb 25, 2023
I investigated it, I found bug in
ConstEvaluator.It will failed in
expr.rewrite(&mut const_evaluator)?But I have not found a specific problem, if there are anyone interested in this bug, welcome !
[-]in `tpcds_logical_q58`[/-][+]`Compute error: Overflow happened` in `tpcds_logical_q58`[/+]jackwener commentedon Feb 25, 2023
cc @HaoYang670 .
After we fix this problem, we can disable
skip_failed_rulesHaoYang670 commentedon Feb 25, 2023
This is really a great news! Great works @jackwener.
jackwener commentedon Mar 1, 2023
failed in expression
"CAST(Int64(100) AS Decimal128(38, 38))"It will fail in
let col_val = phys_expr.evaluate(&self.input_batch)?;and throw
"ArrowError(ComputeError("Overflow happened on: 100 * 100000000000000000000000000000000000000"))"viirya commentedon Mar 1, 2023
I think this is related to what we've dealt with in #3690.
tustvold commentedon Mar 6, 2023
This sounds like a type inference bug, as opposed to something related to the handling of decimal arithmetic. In particular where has this scale of 38 come from? Such a datatype cannot represent anything greater 1 and so the query is perfectly correct to bail out with an error.
The original schema has a precision of 2, as it represents a monetary quantity, and so ending up with a scale of 38 is extremely suspect...
Jefffrey commentedon Apr 21, 2024
skip_failed_rulesis now disabled by default by #6265datafusion/datafusion/common/src/config.rs
Lines 546 to 549 in 19356b2
And
tpcds_logical_q58is not ignored and runs successfully in test suite:datafusion/datafusion/core/tests/tpcds_planning.rs
Lines 319 to 322 in 19356b2
Closing issue