[ 
https://issues.apache.org/jira/browse/HIVE-25749?focusedWorklogId=687857&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-687857
 ]

ASF GitHub Bot logged work on HIVE-25749:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 30/Nov/21 08:52
            Start Date: 30/Nov/21 08:52
    Worklog Time Spent: 10m 
      Work Description: kgyrtkirk merged pull request #2823:
URL: https://github.com/apache/hive/pull/2823


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 687857)
    Time Spent: 0.5h  (was: 20m)

> Check if RelMetadataQuery.collations() returns 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
>              Labels: pull-request-available
>             Fix For: 4.0.0
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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.
> 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



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to