Details

    • Sub-task
    • Status: Open
    • Blocker
    • Resolution: Unresolved
    • 1.25.0
    • None
    • core
    • None

    Description

      Currently, one-half of the methods in RelTraitSet fails with NPE, and another half does have some null-checks. Then there are getDefault() and isDefault()

      AFAIK the only way to create a traitset with null element currently is to implement org.apache.calcite.plan.RelTraitDef#getDefault to return null (which never happens in Calcite code).
      However, such a traitset would likely fail with NPE in org.apache.calcite.plan.RelTraitSet#satisfies quite fast.

      RelCollationTraitDef and RelDistributionTraitDef have non-null default value which might interfere with collation and distribution metadata. For instance, distribution metadata might return null, and then it would fail with NPE when replacing distribution trait.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              vladimirsitnikov Vladimir Sitnikov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: