[ 
https://issues.apache.org/jira/browse/HIVE-5567?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13797232#comment-13797232
 ] 

Owen O'Malley commented on HIVE-5567:
-------------------------------------

The SARG is a best effort for optimization. It doesn't guarantee that all types 
and predicates are supported. For example, if you do a UDF like "where MyUdf(X) 
= 20" that can't be translated in to a SARG. Even for predicates that can be 
handled,  currently only blocks of rows are tested and are accepted if any of 
the rows may pass the complete filter. In all cases the complete filter is 
still applied by Hive. SARGs are just optimizing which groups of rows need to 
be read from HDFS at all.

That said, we should add decimal, date, and timestamp support to SARGs. That 
will be a bigger project and I'll file a separate jira.

This issue is about preventing the optimization from causing run time errors. 
*smile*




> Add better protection code for SARGs
> ------------------------------------
>
>                 Key: HIVE-5567
>                 URL: https://issues.apache.org/jira/browse/HIVE-5567
>             Project: Hive
>          Issue Type: Bug
>          Components: File Formats
>    Affects Versions: 0.12.0
>            Reporter: Owen O'Malley
>            Assignee: Owen O'Malley
>
> Currently, the SARG parser gets a NPE when the push down predicate uses a 
> type like decimal that isn't supported.



--
This message was sent by Atlassian JIRA
(v6.1#6144)

Reply via email to