Details
-
Sub-task
-
Status: Open
-
Blocker
-
Resolution: Unresolved
-
1.25.0
-
None
-
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
- is related to
-
CALCITE-4215 Ensure org.apache.calcite.schema.Statistic uses null vs emptyList appropriately
- Open
- relates to
-
CALCITE-4218 Clarify RelMetadataQuery#getDistribution nullability
- Open