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

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.22.0
    • Component/s: None
    • Labels:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: