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
