calcite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Farkas <>
Subject Re: Unit Testing Planner Output
Date Thu, 08 Feb 2018 19:10:34 GMT
Thanks Julian,

I'll take a look and follow up with any additional questions.


From: Julian Hyde <>
Sent: Thursday, February 8, 2018 10:17:32 AM
To: dev
Subject: Re: Unit Testing Planner Output

Are you familiar with RelOptRulesTest? It compares the RelNode tree before and after applying
a particular rule or set of rules. You can apply rules beforehand to get the tree into exactly
the desired state, so you can see the effect of the rule(s) you want to test. The before and
after strings are held in an XML file so it’s easy to update the output if necessary.

> On Feb 8, 2018, at 9:51 AM, Timothy Farkas <> wrote:
> Hi All,
> I've recently been working on Drill ticket to make sure Drill's planner (calcite) does
not assume the HashJoin operator preserves ordering by removing the Collation trait. I'm at
the point where I want to write a decisive unit test for my change. Currently Drill tests
the output of it's planner by producing an explain string for a query and matching regexes
against it to see if the output looks kind of right. I'm not particularly confident in this
approach and was wondering if you guys have a better way to test planner outputs and the effects
of traits like the Collation trait?
> Thanks,
> Tim

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