Class QuidemTest

java.lang.Object
org.apache.calcite.test.QuidemTest

@TestInstance(PER_CLASS) public abstract class QuidemTest extends Object
Test that runs every Quidem file as a test.
  • Constructor Details

    • QuidemTest

      public QuidemTest()
  • Method Details

    • useTopDownGeneralDecorrelator

      protected boolean useTopDownGeneralDecorrelator()
    • data

      protected static Collection<String> data(String first)
    • data

      protected static Collection<String> data(String first, String substring)
      Debugging helper which returns only a subset of the files produced by data(first).
      Parameters:
      first - File path indicating where IQ files are searched.
      substring - Only files that contain this substring are returned.
      Returns:
      The list of IQ files produced by data(first) which match the restriction.

      I find that often when I debug quidem tests it is handy to only run the currently modified file. By replacing the call to data(first) with a call to data(first, restricted) one can easily just run the new tests. But do not forget to undo this change when submitting the final PR!

    • checkRun

      protected void checkRun(String path) throws Exception
      Throws:
      Exception
    • getCoreRule

      public static RelOptRule getCoreRule(String ruleName)
    • customize

      protected CalciteAssert.AssertThat customize(CalciteAssert.AssertThat assertThat)
      Allows subclasses to customize the connection.
    • createCommandHandler

      protected net.hydromatic.quidem.CommandHandler createCommandHandler()
      Creates a command handler.
    • createConnectionFactory

      protected net.hydromatic.quidem.Quidem.ConnectionFactory createConnectionFactory()
      Creates a connection factory.
    • test

      @ParameterizedTest @MethodSource("getPath") public void test(String path) throws Exception
      Throws:
      Exception
    • getPath

      protected abstract Collection<String> getPath()
      Factory method for test(String) parameters.