Package org.apache.calcite.test
Class QuidemTest
java.lang.Object
org.apache.calcite.test.QuidemTest
Test that runs every Quidem file as a test.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classCommand that prints the validated parse tree of a SQL statement.protected classQuidem connection factory for Calcite's built-in test schemas. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected net.hydromatic.quidem.CommandHandlerCreates a command handler.protected net.hydromatic.quidem.Quidem.ConnectionFactoryCreates a connection factory.protected CalciteAssert.AssertThatcustomize(CalciteAssert.AssertThat assertThat) Allows subclasses to customize the connection.protected static Collection<String>protected static Collection<String>Debugging helper which returns only a subset of the files produced bydata(first).static RelOptRulegetCoreRule(String ruleName) protected abstract Collection<String>getPath()Factory method fortest(String)parameters.voidprotected boolean
-
Constructor Details
-
QuidemTest
public QuidemTest()
-
-
Method Details
-
useTopDownGeneralDecorrelator
protected boolean useTopDownGeneralDecorrelator() -
data
-
data
Debugging helper which returns only a subset of the files produced bydata(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
- Throws:
Exception
-
getCoreRule
-
customize
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
- Throws:
Exception
-
getPath
Factory method fortest(String)parameters.
-