Jacques' answer is helpful, thank you.
I had this same question.

What makes things blurry is the fact that "RelBuilder" uses a mix of
RelNode/RexNode stuff, which I found a little confusing.


On Wed, Jan 12, 2022 at 10:18 AM M Singh <[email protected]>
wrote:

>  Hey Jacques:
> That's a wonderful insight.  I will try to understand the concepts in that
> light, but may have more questions.
> Thanks again for your insight.
> Mans
>     On Wednesday, January 12, 2022, 10:06:36 AM EST, Jacques Nadeau <
> [email protected]> wrote:
>
>  RexNode => Works on one record (aka a row expression)
> RelNode => Works on a set of records (aka a relational expression)
>
> For example:
> A sort reorders a number of records. As such it is a RelNode (it works on
> many records)
> Adding two numbers (e.g. 4+6) is a RexNode, it works on each record
> independently of the last.
>
> Most people who aren't super familiar with relational algebra (see
> wikipedia) think in terms of RexNodes since that is what people learn about
> in grammar school. When I first started looking at Calcite code I had the
> same confusion. Best way to try to understand is look at the plans of some
> sql queries and see how each type of object appears.
>
> Hope that helps!
>
>
>
> On Wed, Jan 12, 2022 at 6:31 AM M Singh <[email protected]>
> wrote:
>
> > Hi:
> > I am trying to understand the difference b/w RelNode and RexNode.  I have
> > taken a looks at the javadocs and a few examples, but am still not clear
> > what role they play.
> > It's a newbie questions, but if there is any good
> > blog/documentation/article, please let me know.
> > Thanks
> > Mans
>

Reply via email to