You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Alessandro Solimando (Jira)" <ji...@apache.org> on 2021/11/29 16:31:00 UTC
[jira] [Assigned] (HIVE-25749) Check if RelMetadataQuery.collations() return null to avoid NPE
[ https://issues.apache.org/jira/browse/HIVE-25749?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alessandro Solimando reassigned HIVE-25749:
-------------------------------------------
> Check if RelMetadataQuery.collations() return null to avoid NPE
> ---------------------------------------------------------------
>
> Key: HIVE-25749
> URL: https://issues.apache.org/jira/browse/HIVE-25749
> Project: Hive
> Issue Type: Bug
> Components: CBO, Query Planning
> Affects Versions: 4.0.0
> Reporter: Alessandro Solimando
> Assignee: Alessandro Solimando
> Priority: Major
>
> Accoring to "RelMetadataQuery.collations()" [javadoc|https://github.com/apache/calcite/blob/calcite-1.25.0/core/src/main/java/org/apache/calcite/rel/metadata/RelMetadataQuery.java#L537], the method can return "null" if collactions information are not available.
> Hive invokes the method in two places ([RelFieldTrimmer|https://github.com/apache/hive/blob/1046f41ea36ab3c8b036481128ba9b76dda2882a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/RelFieldTrimmer.java#L192] and [HiveJoin|https://github.com/apache/hive/blob/1046f41ea36ab3c8b036481128ba9b76dda2882a/ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/reloperators/HiveJoin.java#L206]), but it does not check for "null" return values, which can cause NPE.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)