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

Disallow sub-classes of RelOptRuleOperand

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.8.0
    • Component/s: None
    • Labels:
      None

      Description

      Disallow sub-classes of RelOptRuleOperand. The only reason that people have sub-classed RelOptRuleOperand is to override the boolean matches(RelNode) method, and you can now achieve that by supplying a Predicate to the constructor.

      Next release, we will deprecate RelOptRuleOperand's protected constructor and create a new private or package-protected one. Later we will remove that constructor.

        Activity

        Hide
        jnadeau Jacques Nadeau added a comment -

        Have you found that Predicates perform the same as direct implementations? I'd guess they are slower.

        Show
        jnadeau Jacques Nadeau added a comment - Have you found that Predicates perform the same as direct implementations? I'd guess they are slower.
        Hide
        julianhyde Julian Hyde added a comment -

        It's probably a wash: predicate.apply(rel) will be slower, while RelOptRuleOperand.matches will cease to be a virtual call, so will be faster, and it's called more often.

        Show
        julianhyde Julian Hyde added a comment - It's probably a wash: predicate.apply(rel) will be slower, while RelOptRuleOperand.matches will cease to be a virtual call, so will be faster, and it's called more often.
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/d81133fd .
        Hide
        julianhyde Julian Hyde added a comment -

        Resolved in release 1.8.0 (2016-06-13).

        Show
        julianhyde Julian Hyde added a comment - Resolved in release 1.8.0 (2016-06-13).

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development