calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Grgurina <>
Subject Re: Execute multiple RelNodes from single RelNode
Date Wed, 05 Jun 2019 11:57:56 GMT
Hi Chunwei,

the most basic example I can think of is:
1) Application sends one TableModify operation, for example, INSERT.
2) Calcite receives that TableModify
3) Calcite transforms it into multiple TableModifies that transparently (to the application)
target multiple distributed tables, or INSERTs in this example
4) Calcite executes those queries, at this point, without distributed transation. We deal
with that later.

There are serveral ways we can go about this:
1) One way would be to modify TableModify to allow multiple child nodes, at the moment it's
a unary operation - it executes operation on single child only. Notice, however, that by using
PUSH method in rules, you can push multiple childs after it, but it executes only first.
2) The other way would be to control the Calcite flow, which I think is done with CalcitePrepareImpl.
Please correct me if I'm wrong.
3) Change something in SqlToRelConverter.

If anyone can think of a better way, I'm open to suggestions and constructive criticism.

Ivan Grgurina
Research Assistant (ZEMRIS)
From: Chunwei Lei <>
Sent: Wednesday, June 5, 2019 4:25 AM
Subject: Re: Execute multiple RelNodes from single RelNode

Hi, Ivan.

Could you please explain more detail for your question? Maybe give an


On Tue, Jun 4, 2019 at 8:59 PM Ivan Grgurina <> wrote:

> Can I create multiple top-level RelNodes out of the single SqlNode in
> SqlToRelConverter class or single RelNode through RelOptRules and have
> Calcite push it to the databases?
> *Ivan Grgurina*
> Research Assistant (ZEMRIS)
> ------------------------------
> <>
> <>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message