Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-3327

Simplify SqlValidatorTest by replacing 'boolean typeCoercion' parameter with fluent method 'Sql.withTypeCoercion(boolean)'

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.22.0
    • None
    • None

    Description

      Simplify SqlValidatorTest by replacing boolean typeCoercion parameter with fluent method withTypeCoercion(boolean) in class SqlValidatorTestCase.Sql.

      The problem with the boolean typeCoercion parameter is that it doesn't compose with all of the other flags we might want to pass - are we testing a query or an expression?, is it supposed to pass or fail?, does it contain window functions? - and therefore we have to add it in a combinatorial number of places.

      Fluent interfaces are preferred over "test methods" like checkExpFails for big tests like SqlValidatorTest.

      I'm developing a fix, and I'll post the branch URL shortly.

      Attachments

        Issue Links

          Activity

            People

              julianhyde Julian Hyde
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: