You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@gluten.apache.org by "loudongfeng (via GitHub)" <gi...@apache.org> on 2024/03/13 07:06:27 UTC

[I] [CH] avg(bigint) return wrong result when overflow [incubator-gluten]

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

   ### Backend
   
   CH (ClickHouse)
   
   ### Bug description
   
   ```sql
   create table big_int(id bigint) using parquet;
   insert into big_int 
   values 
   (9223372036854775807),
   (9223372036854775807),
   (9223372036854775807),
   (9223372036854775807);
   select avg(id) from big_int
   ```
   Expected : 9.223372036854776E18
   Actual : -1
   
   ### 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: 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] [CH] avg(bigint) return wrong result when overflow [incubator-gluten]

Posted by "rui-mo (via GitHub)" <gi...@apache.org>.
rui-mo closed issue #4946: [CH] avg(bigint) return wrong result when overflow
URL: https://github.com/apache/incubator-gluten/issues/4946


-- 
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] [CH] avg(bigint) return wrong result when overflow [incubator-gluten]

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

   Average is calculated by sum/count.
   Internally, spark use double for sum DataType ; while ClickHouse use bigint, which is just the input type.


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