You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (Jira)" <ji...@apache.org> on 2020/11/14 21:51:00 UTC
[jira] [Assigned] (CALCITE-4372) Correct specification
getCumulativeCost and getNonCumulativeCost so it should always produce
non-nullable value
[ https://issues.apache.org/jira/browse/CALCITE-4372?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Vladimir Sitnikov reassigned CALCITE-4372:
------------------------------------------
Assignee: (was: Vladimir Sitnikov)
> Correct specification getCumulativeCost and getNonCumulativeCost so it should always produce non-nullable value
> ---------------------------------------------------------------------------------------------------------------
>
> Key: CALCITE-4372
> URL: https://issues.apache.org/jira/browse/CALCITE-4372
> Project: Calcite
> Issue Type: Sub-task
> Components: core
> Affects Versions: 1.26.0
> Reporter: Vladimir Sitnikov
> Priority: Major
>
> 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 :(
--
This message was sent by Atlassian Jira
(v8.3.4#803005)