wangyum commented on issue #4947:
URL: 
https://github.com/apache/incubator-gluten/issues/4947#issuecomment-2768370115

   Another related issue:
   ```sql
   CREATE TEMPORARY table t AS SELECT * FROM
     (VALUES
       (cast('75.00' as decimal(38,2)), cast('1' as int), 
cast('0.74820000000000' as decimal(18,14))),
       (cast('75.00' as decimal(38,2)), cast('1' as int), 
cast('0.74820000000000' as decimal(18,14))),
       (cast('75.00' as decimal(38,2)), cast('1' as int), 
cast('0.74820000000000' as decimal(18,14))))
     AS v(item_price, quantity, lstg_curncy_exchng_rate);
   
   SELECT CAST(CAST(item_price AS double) * CAST(quantity AS double) * 
CAST(lstg_curncy_exchng_rate AS double) AS DECIMAL(18,2)) FROM t;
   ```
   
   ```
   0: jdbc:hive2://localhost:10000/> CREATE TEMPORARY table t AS SELECT * FROM
   . . . . . . . . . . . . . . . . >   (VALUES
   . . . . . . . . . . . . . . . . >     (cast('75.00' as decimal(38,2)), 
cast('1' as int), cast('0.74820000000000' as decimal(18,14))),
   . . . . . . . . . . . . . . . . >     (cast('75.00' as decimal(38,2)), 
cast('1' as int), cast('0.74820000000000' as decimal(18,14))),
   . . . . . . . . . . . . . . . . >     (cast('75.00' as decimal(38,2)), 
cast('1' as int), cast('0.74820000000000' as decimal(18,14))))
   . . . . . . . . . . . . . . . . >   AS v(item_price, quantity, 
lstg_curncy_exchng_rate);
   +---------+
   | Result  |
   +---------+
   +---------+
   No rows selected (1.013 seconds)
   0: jdbc:hive2://localhost:10000/> 
   0: jdbc:hive2://localhost:10000/> set spark.gluten.enabled=false;
   +-----------------------+--------+
   |          key          | value  |
   +-----------------------+--------+
   | spark.gluten.enabled  | false  |
   +-----------------------+--------+
   1 row selected (0.017 seconds)
   0: jdbc:hive2://localhost:10000/> SELECT CAST(CAST(item_price AS double) * 
CAST(quantity AS double) * CAST(lstg_curncy_exchng_rate AS double) AS 
DECIMAL(18,2)) FROM t;
   +----------------------------------------------------+
   | CAST(((CAST(item_price AS DOUBLE) * CAST(quantity AS DOUBLE)) * 
CAST(lstg_curncy_exchng_rate AS DOUBLE)) AS DECIMAL(18,2)) |
   +----------------------------------------------------+
   | 56.11                                              |
   | 56.11                                              |
   | 56.11                                              |
   +----------------------------------------------------+
   3 rows selected (0.146 seconds)
   0: jdbc:hive2://localhost:10000/> set spark.gluten.enabled=true;
   +-----------------------+--------+
   |          key          | value  |
   +-----------------------+--------+
   | spark.gluten.enabled  | true   |
   +-----------------------+--------+
   1 row selected (0.017 seconds)
   0: jdbc:hive2://localhost:10000/> SELECT CAST(CAST(item_price AS double) * 
CAST(quantity AS double) * CAST(lstg_curncy_exchng_rate AS double) AS 
DECIMAL(18,2)) FROM t;
   +----------------------------------------------------+
   | CAST(((CAST(item_price AS DOUBLE) * CAST(quantity AS DOUBLE)) * 
CAST(lstg_curncy_exchng_rate AS DOUBLE)) AS DECIMAL(18,2)) |
   +----------------------------------------------------+
   | 56.12                                              |
   | 56.12                                              |
   | 56.12                                              |
   +----------------------------------------------------+
   3 rows selected (0.177 seconds)
   ```


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