Skip to content

Compute error: Overflow happened in tpcds_logical_q58 #5396

Closed

Description

@jackwener

Describe the bug
after disable skip_failed_rules.

tpcds_logical_q58 failed in

'simplify_expressions' failed due to unexpected error: Arrow error: Compute error: Overflow happened on: 100 * 100000000000000000000000000000000000000"

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.

Activity

  1. jackwener commented on Feb 25, 2023

    @jackwener
    MemberAuthor

    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 !

  2. changed the title [-]in `tpcds_logical_q58`[/-] [+]`Compute error: Overflow happened` in `tpcds_logical_q58`[/+] on Feb 25, 2023
  3. jackwener commented on Feb 25, 2023

    @jackwener
    MemberAuthor

    cc @HaoYang670 .
    After we fix this problem, we can disable skip_failed_rules

  4. HaoYang670 commented on Feb 25, 2023

    @HaoYang670
    Contributor

    After we fix this problem, we can disable skip_failed_rules

    This is really a great news! Great works @jackwener.

  5. jackwener commented on Mar 1, 2023

    @jackwener
    MemberAuthor

    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"))"

  6. viirya commented on Mar 1, 2023

    @viirya
    Member

    I think this is related to what we've dealt with in #3690.

  7. tustvold commented on Mar 6, 2023

    @tustvold
    Contributor

    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...

  8. Jefffrey commented on Apr 21, 2024

    @Jefffrey
    Contributor

    skip_failed_rules is now disabled by default by #6265

    /// When set to true, the logical plan optimizer will produce warning
    /// messages if any optimization rules produce errors and then proceed to the next
    /// rule. When set to false, any rules that produce errors will cause the query to fail
    pub skip_failed_rules: bool, default = false

    And tpcds_logical_q58 is not ignored and runs successfully in test suite:

    #[tokio::test]
    async fn tpcds_logical_q58() -> Result<()> {
    create_logical_plan(58).await
    }

    Closing issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions