You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Sergey Shelukhin (JIRA)" <ji...@apache.org> on 2015/11/04 21:21:27 UTC

[jira] [Commented] (HIVE-12092) SARGS: UDFLike prefix cases needs to be translated into >= sargs

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

Sergey Shelukhin commented on HIVE-12092:
-----------------------------------------

{noformat}
+      if (constValue != null) {
+      }
{noformat} should return something.

Also as far as I understand it doesn't take care of double backslash correctly. State machine with substring at the end might be better.

Also perhaps there's a better way than a static method with type check to call searchArgument. Perhaps it can just be callable on GenericUDF, null by default, and the Bridge would delegate to UDFLike if the class is correct? Or something.
Or, I wonder if it could just be done when creating SARG from UDF, so that SARG-specific code stays SARG-specific without Hive making assumptions about what SARG can and cannot do? There may be a good reason to not do it this way, I just wonder.

> SARGS: UDFLike prefix cases needs to be translated into >= sargs
> ----------------------------------------------------------------
>
>                 Key: HIVE-12092
>                 URL: https://issues.apache.org/jira/browse/HIVE-12092
>             Project: Hive
>          Issue Type: Improvement
>          Components: Logical Optimizer
>    Affects Versions: 1.3.0, 2.0.0
>            Reporter: Gopal V
>            Assignee: Gopal V
>         Attachments: HIVE-12092.1.patch
>
>
> A query which follows the following format
> {{select * from table where access_url like "https:%" ;}}
> needs to rewrite SARGs as 
> {{access_url >= 'https:'}}
> to get a significant hit-rate on a simple expression.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)