Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-482 Implement SQL and planner hints
  3. CALCITE-3723

Following the change to add hints to RelNode, deprecate the old constructors

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.22.0
    • None

    Description

      In CALCITE-482 and CALCITE-3590 we added constructors for various sub-classes RelNode (LogicalProject, LogicalAggregate, and others) that take a list of hints. But now those classes have two constructors. Our practice has been to have only one (public, non-deprecated) constructor in each RelNode class. (Otherwise we would have dozens.) So, please deprecate the old constructors and change code that uses them.

      Can we do this before 1.22?

      Also note that the new and old constructors have exactly the same comment. You should avoid that. But in this case, just remove the comment of the deprecated constructor.

      The non-hints constructor does new ArrayList<>(). Please change to use ImmutableList.of(), which saves a malloc.

      cc danny0405 and icshuo.

      Attachments

        Issue Links

          Activity

            People

              danny0405 Danny Chen
              julianhyde Julian Hyde
              Votes:
              0 Vote for this issue
              Watchers:
              5 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 - 20m
                  20m