Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-25749

Check if RelMetadataQuery.collations() returns null to avoid NPE

    XMLWordPrintableJSON

Details

    Description

      Accoring to "RelMetadataQuery.collations()" javadoc, the method can return "null" if collactions information are not available.

      Hive invokes the method in two places (RelFieldTrimmer and HiveJoin), but it does not check for "null" return values, which can cause NPE.

      For RelFieldTrimmer, the same bug has been fixed in Calcite (where the code has been taken from) here: https://github.com/apache/calcite/commit/47871235177a3a0d398b1d890d1d2e947028e052

      Attachments

        Issue Links

          Activity

            People

              asolimando Alessandro Solimando
              asolimando Alessandro Solimando
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h