[ https://issues.apache.org/jira/browse/HIVE-25952?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17868076#comment-17868076 ]
Stamatis Zampetakis commented on HIVE-25952: -------------------------------------------- I created a new PR (#5360) to gauge the impact on existing test cases. I would like to advance this work mainly to avoid potential wrong result issues due to the discrepancies outlined under HIVE-26733. [~asolimando] I feel that HIVE-25966 is redundant. Is this really a blocker for this ticket? If not I guess we can close HIVE-25966 as won't fix. I like the analysis of differences in the description of this ticket. I agree with everything except the line describing the behavior for {{RexCall}} expression. It seems that both in Hive and Calcite the arguments of the call are checked. In Hive the check is incomplete/wrong cause the last argument of the call determines the result, while in Calcite all call arguments must be constants. > Drop HiveRelMdPredicates::getPredicates(Project...) to use that of > RelMdPredicates > ---------------------------------------------------------------------------------- > > Key: HIVE-25952 > URL: https://issues.apache.org/jira/browse/HIVE-25952 > Project: Hive > Issue Type: Sub-task > Components: CBO > Affects Versions: 4.0.0 > Reporter: Alessandro Solimando > Assignee: Alessandro Solimando > Priority: Major > Labels: pull-request-available > Time Spent: 1h 20m > Remaining Estimate: 0h > > There are some differences on this method between Hive and Calcite, the idea > of this ticket is to unify the two methods, and then drop the override in > HiveRelMdPredicates in favour of the method of RelMdPredicates. > After applying HIVE-25966, the only difference is in the test for constant > expressions, which can be summarized as follows: > ||Expression Type|Is Constant for Hive?||Is Constant for Calcite?|| > |InputRef|False|False| > |Call|True if function is deterministic (arguments are not checked), false > otherwise|True if function is deterministic and all operands are constants, > false otherwise| > |CorrelatedVariable|False|False| > |LocalRef|False|False| > |Over|False|False| > |DymanicParameter|False|True| > |RangeRef|False|False| > |FieldAccess|False|Given expr.field, true if expr is constant, false > otherwise| -- This message was sent by Atlassian Jira (v8.20.10#820010)