You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "rui-mo (via GitHub)" <gi...@apache.org> on 2025/08/25 10:06:56 UTC

[I] [VL] Result mismatch of decimal multiply and divide [incubator-gluten]

rui-mo opened a new issue, #10526:
URL: https://github.com/apache/incubator-gluten/issues/10526

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   Came across this issue where results of decimal division diff a lot.
   ```
   CREATE TABLE decimal_bug_test_table 
   USING PARQUET
   LOCATION '/home/dharanad/decimal_bug'
   AS
   SELECT 
     CAST(104352831492914033 AS DECIMAL(19,0)) as dec19_0,
     CAST(0.98188745084925098440983457564770612914 AS DECIMAL(38,38)) as dec38_38,
     CAST(true AS BOOLEAN) as bool_col;
   
   WITH data AS (
     SELECT * FROM parquet.`/home/dharan/decimal_bug`
   )
   SELECT
     dec19_0 / dec38_38 as division_result,
     dec19_0,
     dec38_38,
     TYPEOF(dec19_0 / dec38_38) as result_type
   FROM data
   WHERE bool_col = true
   ORDER BY division_result;
   ```
   Spark
   106277793246728545.582603	104352831492914033	0.98188745084925098440983457564770612914	decimal(38,6)
   
   Gluten
   93790508732.004745	104352831492914033	0.98188745084925098440983457564770612914	decimal(38,6)
   
   -------------
   
   ```
   SELECT dec38_31, dec38_31 * dec38_31 AS result FROM decimal_tables.decimal_multi_cols_v2 order by dec38_31 desc limit 10;
   ```
   
   Spark
   9999771.3966580193276534859500386083931	99995427985419.87451780195064133346831
   
   Gluten
   9999771.3966580193276534859500386083931	640620641975837.66874972904376465920221
   
   
   ### Gluten version
   
   _No response_
   
   ### Spark version
   
   None
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   ```bash
   
   ```


-- 
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: commits-unsubscribe@gluten.apache.org.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Result mismatch of decimal multiply and divide [incubator-gluten]

Posted by "rui-mo (via GitHub)" <gi...@apache.org>.
rui-mo commented on issue #10526:
URL: https://github.com/apache/incubator-gluten/issues/10526#issuecomment-3219639613

   Fixes them in https://github.com/facebookincubator/velox/pull/14203.


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org


Re: [I] [VL] Result mismatch of decimal multiply and divide [incubator-gluten]

Posted by "rui-mo (via GitHub)" <gi...@apache.org>.
rui-mo closed issue #10526: [VL] Result mismatch of decimal multiply and divide
URL: https://github.com/apache/incubator-gluten/issues/10526


-- 
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: commits-unsubscribe@gluten.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@gluten.apache.org
For additional commands, e-mail: commits-help@gluten.apache.org