waynexia opened a new pull request, #2648:
URL: https://github.com/apache/arrow-datafusion/pull/2648

   # Which issue does this PR close?
   
   Closes #.
   
    # Rationale for this change
   
   This PR implements logical plan compilation and executes the compiled plan 
on record batch.
   
   But this implementation only covers a very few types. Only `i64` & `f64` 
array's batch and projection plan are supported. It wouldn't be difficult to 
extend to all primitive types. However, other complex array types and other 
plans that may require variable output length (filter) and complex algorithms 
(join, aggr etc) are hard to implement in pure cranelift IR. It would be 
unavoidable to call into rust code. This is acceptable in my perspective as the 
overhead can be alleviated or eliminated (via LLVM, I guess).
   
   # What changes are included in this PR?
   
   This PR adds serval JIT-related structs. The most important is `JITContext` 
and `JITExecutionPlan`. 
   
   `JITContext` supports compile logical plan into executable 
`JITExecutionPlan`. And `JITExecutionPlan` is a minimal `ExecutionPlan` which 
support `execute()` on `RecordBatch`.
   
   Now we can do something like
   ```rust
   let ctx = JITContext::default();
   let exec_plan = ctx.compile_logical_plan(logical_plan);
   let output = exec_plan.execute(input_record_batch);
   ```
   
   # Are there any user-facing changes?
   
   No
   
   # Does this PR break compatibility with Ballista?
   
   No
   
   


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

Reply via email to