ZhangHuiGui commented on issue #40308: URL: https://github.com/apache/arrow/issues/40308#issuecomment-1996320294
> I'm not sure what is the important part in the codes. Could you explain it? The test codes is the decimal divide operation in compute expression and gandiva expression. We input the save decimal type (11, 3), (20, 9) with same input arr-data, but the results are different. For compute expression, divide result's decimal type is (32,15); but gandiva expression's result is (38, 21). > Could you show the URL that describes the rule? Below rules is our compute expression's rules: https://github.com/apache/arrow/blob/9f0a28f61a068059a6e53f25a3ffcb1689d701ec/cpp/src/arrow/compute/kernels/codegen_internal.cc#L421 And the compute doc: https://github.com/apache/arrow/blob/4fe364efa4be98b35964509e0e3d57a421a48039/docs/source/cpp/compute.rst#L501-L520. > Based on the `kMinAdjustedScale` comment, it seems that the current precision doesn't have strong reason but it's compatible with SQLServer and Impala: Yes, but maybe we should unify these rules between compute expression and gandiva expression. Or the results will be different when user do optimize expression with gandiva? -- 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]
