0

In Apache-Calcite, how do I add a test to SqlToRelConverterTest.java?

I've cloned and renamed a simple existing test case as a proof of concept, but when I run the new test I get:

plan ==> expected: <${plan}> but was: <
    LogicalSort(sort0=[$0], dir0=[ASC])
    LogicalProject(EMPNO=[$0])
    LogicalTableScan(table=[[CATALOG, SALES, EMP]])` >

It looks like I need to populate an expected plan, but I'm not sure where to do that.

LightCC
  • 9,804
  • 5
  • 52
  • 92
seanb
  • 1
  • I was able to find the file for expected results at core/src/test/resources/org/apache/calcite/test/SqlToRelConverterTest.xml. I added an entry for my straw man test and it now passes. There are similar xml files for different components in case someone is looking to add expected results for some different sort of test. – seanb Jul 01 '20 at 20:08
  • Hi and welcome to StackOverflow. Unless responding to a comment from another user, consider editing and updating your question, or, if this new information answers your question, consider posting it as an answer to your own question. Thanks! – LightCC Jul 01 '20 at 21:26

0 Answers0