Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
1.26.0
-
None
-
None
Description
Currently javadoc says getNonCumulativeCost can return null, however, a lot of usages (update: it turns out the number of usages it not really big) assume the resulting value is not null.
For instance, FLINK-11973 is relevant here.
Even though plugins can install custom getNonCumulativeCost handlers, we should make get*CumulativeCost non-nullable, so RelOptPlanner.getCost could be declared and implemented as non-nullable (which is the way the current code behaves)
It does not look right if we declare that "metadata can return null", and then Volcano fails with NPE
Attachments
Issue Links
- relates to
-
FLINK-11973 computeSelfCost method should not return null to avoid NPE
- Closed
-
CALCITE-4302 Improve cost propagation in volcano to avoid re-propagation
- Closed