Class SqlValidatorFixture

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

public class SqlValidatorFixture extends Object
A fixture for testing the SQL validator.

It provides a fluent API so that you can write tests by chaining method calls.

It is immutable. If you have two test cases that require a similar set up (for example, the same SQL expression and parser configuration), it is safe to use the same fixture object as a starting point for both tests.

  • Field Details

    • tester

      public final SqlTester tester
    • factory

      public final SqlTestFactory factory
    • sap

      public final StringAndPos sap
    • expression

      public final boolean expression
    • whole

      public final boolean whole
  • Constructor Details

    • SqlValidatorFixture

      protected SqlValidatorFixture(SqlTester tester, SqlTestFactory factory, StringAndPos sap, boolean expression, boolean whole)
      Creates a SqlValidatorFixture.
      Parameters:
      tester - Tester
      sap - SQL query or expression
      expression - True if sql is an expression, false if it is a query
      whole - Whether the failure location is the whole query or expression
  • Method Details