[
https://issues.apache.org/jira/browse/ARROW-3701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16674787#comment-16674787
]
Pindikura Ravindra commented on ARROW-3701:
-------------------------------------------
@wesm @cpcloud [~pitrou] @jacques-n [~praveenbingo]
I've looked at the re-using the code in arrow/util/decimal.h for implementing
decimal operations in gandiva. However, it has the following issues :
# This class is built on a pair of int64s - using a int128 will have better
perf.
# The functions do not make an attempt to avoid overflow.
** sql implementations have rules for each operation that adjust the scale
when the result precision exceeds 38.
[https://docs.microsoft.com/en-us/sql/t-sql/data-types/precision-scale-and-length-transact-sql?view=sql-server-2017]
# The functions do not track overflow
** It will be nice if there is a warning/error generated when there is
overflow.
I plan to use adapt the code from Apache Impala for this instead. Thoughts ?
> [Gandiva] Add support for decimal operations
> --------------------------------------------
>
> Key: ARROW-3701
> URL: https://issues.apache.org/jira/browse/ARROW-3701
> Project: Apache Arrow
> Issue Type: Task
> Components: Gandiva
> Reporter: Pindikura Ravindra
> Assignee: Pindikura Ravindra
> Priority: Major
>
> To begin with, will add support for 128-bit decimals. There are two parts :
> # llvm_generator needs to understand decimal types (value, precision, scale)
> # code decimal operations : add/subtract/multiply/divide/mod/..
> ** This will be c++ code that can be pre-compiled to emit IR code
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)