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

Always validate preconditions in Filter, Correlate, Snapshot expressions when assertions are enabled

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.27.0
    • None

    Description

      At the moment precondition validation is performed in Filter, Correlate, Snapshot constructors only when CalciteSystemProperty.DEBUG is true and assertions are enabled.

      Most of the time CalciteSystemProperty.DEBUG is set to false so the checks are not performed which could lead to problems that are difficult to spot. Failing fast when there is an obvious problem in the structure of the plan is a great help for fixing issues that may also remain unnoticed for a very long time.

      The goal of this issue is to always validate preconditions in the constructor of Filter, Correlate, and Snapshot regardless if CalciteSystemProperty.DEBUG is enabled or not. To avoid the performance overhead in production the assertions can be disabled as it usually happens.

      Attachments

        Issue Links

          Activity

            People

              zabetak Stamatis Zampetakis
              zabetak Stamatis Zampetakis
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m