Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1859

NPE in validate method of VolcanoPlanner

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.13.0
    • 1.14.0
    • core
    • None

    Description

      CALCITE-1812 introduced the following line in validate method in VolcanoPlanner:

      https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/plan/volcano/VolcanoPlanner.java#L891

      final RelMetadataQuery mq = root.getCluster().getMetadataQuery();
      

      validate might be called as part of the setRoot logic before root is set, thus we are hitting a NPE. Workaround was easy as validate is only called in logging DEBUG level (I guess that is why we did not see this issue before), but this JIRA will fix the issue by retrieving the RelMetadataQuery in validate only when needed.

      Attachments

        Issue Links

          Activity

            People

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: