You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@datafusion.apache.org by "discord9 (via GitHub)" <gi...@apache.org> on 2025/01/14 12:21:46 UTC

[I] [Regression] Panic when handling Decimal128 overflow [datafusion]

discord9 opened a new issue, #14124:
URL: https://github.com/apache/datafusion/issues/14124

   ### Describe the bug
   
   Panic when handling Decimal128 overflow:
   ```sql
   SELECT ('0.54321543215432154321543215432154321'::DECIMAL(35,35) + 10000)::VARCHAR;
   ```
   
   ### To Reproduce
   
   reproduce step:
   install `datafusion-cli`
   ```
   cargo install datafusion-cli
   ```
   ```sql
   -> datafusion-cli
   DataFusion CLI v44.0.0
   > SELECT ('0.54321543215432154321543215432154321'::DECIMAL(35,35) + 10000)::VARCHAR;
   thread 'main' panicked at /home/discord9/.cargo/registry/src/index.crates.io-6f17d22bba15001f/datafusion-expr-common-44.0.0/src/interval_arithmetic.rs:1025:13:
   internal error: entered unreachable code
   note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
   ```
   
   ### Expected behavior
   
   Not panic
   
   ### Additional context
   
   _No response_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] [Regression] Panic when handling Decimal128 overflow [datafusion]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia closed issue #14124: [Regression] Panic when handling Decimal128 overflow
URL: https://github.com/apache/datafusion/issues/14124


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org


Re: [I] [Regression] Panic when handling Decimal128 overflow [datafusion]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on issue #14124:
URL: https://github.com/apache/datafusion/issues/14124#issuecomment-2589836522

   Some investigation:
   
   - `'0.54321543215432154321543215432154321'::DECIMAL(35,35) + 10000` has data types `Decimal(35, 35)` for lhs and `Decimal(20, 0)` for rhs` and `Decimal(38, 35)` for result.
   - Then `'0.54321543215432154321543215432154321'::DECIMAL(35,35)` is judged as a negative value since decimal types don't implement `PartialEq` properly.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: github-unsubscribe@datafusion.apache.org
For additional commands, e-mail: github-help@datafusion.apache.org