Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-4199 Add nullability annotations to the methods and fields, ensure consistency with checkerframework
  3. CALCITE-4372

Correct specification getCumulativeCost and getNonCumulativeCost so it should always produce non-nullable value

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.26.0
    • None
    • core
    • 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

          Activity

            People

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

              Dates

                Created:
                Updated: