[
https://issues.apache.org/jira/browse/HIVE-24632?focusedWorklogId=536409&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-536409
]
ASF GitHub Bot logged work on HIVE-24632:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 15/Jan/21 10:38
Start Date: 15/Jan/21 10:38
Worklog Time Spent: 10m
Work Description: kgyrtkirk merged pull request #1863:
URL: https://github.com/apache/hive/pull/1863
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 536409)
Time Spent: 50m (was: 40m)
> Replace with null when GenericUDFBaseCompare has a non-interpretable val
> ------------------------------------------------------------------------
>
> Key: HIVE-24632
> URL: https://issues.apache.org/jira/browse/HIVE-24632
> Project: Hive
> Issue Type: Improvement
> Components: Parser
> Affects Versions: 4.0.0
> Reporter: Zhihua Deng
> Priority: Major
> Labels: pull-request-available
> Time Spent: 50m
> Remaining Estimate: 0h
>
> The query
> {code:java}
> create table ccn_table(key int, value string);
> set hive.cbo.enable=false;
> select * from ccn_table where key > '123a' ;
> {code}
> will scan all records(partitions) compared to older version, as the plan
> tells:
> {noformat}
> STAGE PLANS:
> Stage: Stage-0
> Fetch Operator
> limit: -1
> Processor Tree:
> TableScan
> alias: ccn_table
> filterExpr: (key > '123a') (type: boolean)
> Statistics: Num rows: 2 Data size: 180 Basic stats: COMPLETE Column
> stats: COMPLETE
> GatherStats: false
> Filter Operator
> isSamplingPred: false
> predicate: (key > '123a') (type: boolean)
> Statistics: Num rows: 1 Data size: 90 Basic stats: COMPLETE Column
> stats: COMPLETE
> Select Operator
> expressions: key (type: int), value (type: string)
> outputColumnNames: _col0, _col1
> Statistics: Num rows: 1 Data size: 90 Basic stats: COMPLETE
> Column stats: COMPLETE
> ListSink{noformat}
> When the TypeCheckProcFactory#getXpathOrFuncExprNodeDesc validates the expr:
> +key > '123a',+ the operator(>) is not an equal operator(=), so the factory
> returns +key > '123a'+ as it is. However all the subclass of
> GenericUDFBaseCompare(except GenericUDFOPEqualNS and GenericUDFOPNotEqualNS)
> would return null if either side of the function children is null, so it's
> safe to return constant null when processing the expr +`key > '123a'`+. This
> will benifit some queries when the cbo is disabled.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)