You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Vineet Garg <vg...@hortonworks.com> on 2019/01/31 01:42:52 UTC

How to run Quidem test

Hello all,

How do I run a particular (e.g. sql/dummy.iq) test (with debug mode on)?

I have run these tests in the past but I can’t seem to recall how did I manage to run it.

Thanks,
Vineet G

Re: How to run Quidem test

Posted by Vineet Garg <vg...@hortonworks.com>.
Thanks Julian!

> On Jan 30, 2019, at 6:32 PM, Julian Hyde <jh...@apache.org> wrote:
> 
> Run the main method of org.apache.calcite.test.CoreQuidemTest (or one of the other sub-classes of QuidemTest) and pass the path of the script (e.g. “sql/agg.iq”) as the argument.
> 
> You can also run CoreQuidemTest as a Junit test. It is parameterized, and generates a list of all .iq files (e.g. sql/agg.iq sql/blank.iq etc.) as its parameters. Thus it will run all quidem tests in that module.
> 
> If Quidem fails, it displays a diff to stdout, and also leaves an output file core/target/test-classes/sql/surefire/sql/agg.iq with which you can overwrite (if you choose) the original script file core/src/test/resources/sql/agg.iq.
> 
> Julian
> 
> 
>> On Jan 30, 2019, at 5:42 PM, Vineet Garg <vg...@hortonworks.com> wrote:
>> 
>> Hello all,
>> 
>> How do I run a particular (e.g. sql/dummy.iq) test (with debug mode on)?
>> 
>> I have run these tests in the past but I can’t seem to recall how did I manage to run it.
>> 
>> Thanks,
>> Vineet G
> 


Re: How to run Quidem test

Posted by Julian Hyde <jh...@apache.org>.
Run the main method of org.apache.calcite.test.CoreQuidemTest (or one of the other sub-classes of QuidemTest) and pass the path of the script (e.g. “sql/agg.iq”) as the argument.

You can also run CoreQuidemTest as a Junit test. It is parameterized, and generates a list of all .iq files (e.g. sql/agg.iq sql/blank.iq etc.) as its parameters. Thus it will run all quidem tests in that module.

If Quidem fails, it displays a diff to stdout, and also leaves an output file core/target/test-classes/sql/surefire/sql/agg.iq with which you can overwrite (if you choose) the original script file core/src/test/resources/sql/agg.iq.

Julian


> On Jan 30, 2019, at 5:42 PM, Vineet Garg <vg...@hortonworks.com> wrote:
> 
> Hello all,
> 
> How do I run a particular (e.g. sql/dummy.iq) test (with debug mode on)?
> 
> I have run these tests in the past but I can’t seem to recall how did I manage to run it.
> 
> Thanks,
> Vineet G