[ 
https://issues.apache.org/jira/browse/ARROW-3701?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16675728#comment-16675728
 ] 

Jacques Nadeau commented on ARROW-3701:
---------------------------------------

{quote}However, we'll need to keep a standards-compliant fallback path with two 
int64 for compilers which don't implement a 128-bit integer.
{quote}
I'm confused by this comment. Aren't these functions going to be compiled into 
LLVM IR at build time such that the target platform needs to be supported by 
LLVM (not the compiling platform). In that case, wouldn't we be able to stop 
worrying about compilers on different platforms for these operations? We could 
just generate the IR on one platform, right? (Assuming that we can use pure 
IR--which I believe is the most optimal pattern).

>From an IR perspective, we probably want to map down to LLVM's int128 
>operations since LLVM has that support within its IR and it allows future 
>optimizations to be clean (and LLVM to target/compile as appropriate), right?

It seems like we should have a very clear delineation in Gandiva between code 
that is compiled to IR versus code that is compiled for execution (I think 
Impala uses -ir.cc to identify the former).

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

Reply via email to