Thanks for sharing this Michael. Interesting read.

The approach that they followed seems like what I had in mind as an "easy"
solution.

"Calcite is a Java project, so integration with C++ isn't entirely trivial.
Fortunately, we can serialize the relational algebra it outputs to JSON and
use this string as a starting point for our C++ query execution. We had to
extend the existing JSON serialization in Calcite in order to preserve more
details about literal types and subqueries, which proved to be a
straightforward task. This approach simplifies the JNI interface since we
don't need to move complex objects across the boundary."

On Tue, Apr 7, 2020 at 12:01 PM Michael Mior <mm...@apache.org> wrote:

> There's not much detail, but the blog post below[0] discusses how MapD
> integrated Calcite with their C++ code. At least some of their is open
> source[1].
>
> [0]
> https://www.omnisci.com/blog/fast-and-flexible-query-analysis-at-mapd-with-apache-calcite-2
> [1] https://github.com/omnisci/omniscidb
> --
> Michael Mior
> mm...@apache.org
>
> Le dim. 5 avr. 2020 à 05:44, Tal Glanzman <talglanz...@gmail.com> a écrit
> :
> >
> > Hi,
> >
> > I'm looking for a some guidance / references on how to approach the
> > following scenario.
> >
> > I have 2 separate software modules
> > 1. Cpp-Codebase that parses an SQL query and construct a plan
> > 2. Calcite adapter to my specific domain
> >
> > My goal is to provide a server, such that the Cpp-Codebase, as the
> client,
> > can construct (in the server) a corresponding plan (of calcite). The
> client
> > shouldn't receive the constructed plan back.
> >
> > Basically, it's an integration problem, i want to convert
> NativePlan@Client
> > to RelNode@Server.
> >
> > *I am looking for references based on your experience how would i go
> about
> > this. *
> >
> > My initial intuition is to provide a gRPC service, with messages that
> > according to will construct the plan
> >   - the client will convert it's model to the gRPC model
> >   - the server will convert the gRPC model to the RelNode
> >
> > This also includes a manual construction of the RelNode which im not sure
> > how to go about...
> >
> > Thanks in advance!
> > Tal
>

Reply via email to