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

    • Type: Sub-task
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 1.26.0
    • Fix Version/s: None
    • Component/s: core
    • Labels:
      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

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

                Dates

                • Created:
                  Updated: