kecookier opened a new issue, #4891:
URL: https://github.com/apache/incubator-gluten/issues/4891

   ### Backend
   
   VL (Velox)
   
   ### Bug description
   
   The type of column `ind_order_amount`  in `SrcTable` is `decimal(20,4)`, and 
the type of column `week_ind_order_amount` 
    in `TableTarget` is `float`.
   
   The following SQL snippet shows that the calculation of 
colum`week_ind_order_amount` for Gluten is inconsistent with the Vanilla 
version, as detailed in the screenshot. 
   
   gluten branch https://github.com/apache/incubator-gluten/tree/branch-1.1
   ```sql
   INSERT OVERWRITE TABLE `TableTarget` PARTITION (dt='2024-02-29')
   SELECT 
   a.deal_id,
   SUM(a.quantity) AS week_quantity,
   SUM(a.ind_quantity) AS week_ind_quantity,
   SUM(a.ind_order_amount) AS week_ind_order_amount,
   SUM(a.user_cnt) AS week_user_cnt,
   FROM
   (
     SELECT deal_id,
     quantity,
     ind_quantity,
     ind_order_amount,
     user_cnt,
     FROM SrcTable
     WHERE partition_date BETWEEN '2024-01-31' AND '2024-02-29'
       AND deal_id IS NOT NULL
   ) a
   GROUP BY deal_id;
   ```
   
![image](https://github.com/apache/incubator-gluten/assets/3390068/eeb598cd-2f98-4227-9e9b-380ab2de5a65)
   
   
   ### Spark version
   
   None
   
   ### Spark configurations
   
   _No response_
   
   ### System information
   
   _No response_
   
   ### Relevant logs
   
   _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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to