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

SqlDelegatingConformance incorrectly delegates to SqlConformanceEnum.DEFAULT

    XMLWordPrintableJSON

Details

    Description

      SqlDelegatingConformance is implemented as a sub-class of SqlAbstractConformance instead of being a pure delegator and just implemented the SqlConformance interface.

      Because of this when a new method is added to the SqlConformance interface (as happens fairly regularly) no exception or missing method compile error will be triggered for SqlDelegatingConformance and there is no indication that the class will misbehave.

      Instead what will happen is that for the newly added methods, calls to an instance of SqlDelegatingConformance will be send to the SqlAbstractConformance version of the method instead of the delegate's version of the method, silently returning the incorrect value any time the delegate has a different behavior than SqlConformanceEnum.DEFAULT.

      SqlDelegatingConformance should be changed to directly implement the interface, which will force a new delegating method to be added any time a new method is added to the SqlConformance interface by just failing to compile. On compilation failure, the fix of added a new delegating method is obvious.

      Attachments

        Issue Links

          Activity

            People

              adamkennedy77 Adam Kennedy
              adamkennedy77 Adam Kennedy
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - 1h
                  1h
                  Remaining:
                  Time Spent - 20m Remaining Estimate - 40m
                  40m
                  Logged:
                  Time Spent - 20m Remaining Estimate - 40m
                  20m