You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Ashutosh Chauhan (JIRA)" <ji...@apache.org> on 2014/08/11 19:08:13 UTC

[jira] [Commented] (HIVE-7160) Vectorization Udf: GenericUDFConcat for non-string columns input, is not supported

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

Ashutosh Chauhan commented on HIVE-7160:
----------------------------------------

I think design issue here is one raised in HIVE-7632 {{Vectorizer}} currently inserts casts and than evaluates it so that types of all operands match for UDF. It does so because currently Hive doesnt upcast operands while it does semantic checking and leave this to runtime where it is achieved, mainly via the logic in {{GenericUDFBaseNumeric}} Instead of delegating type casting to runtime, this should happen at compile time, when we are doing type checking and should upcast operands as necessary. Once we do this in {{TypeCheckProcFactory}} there will be no need to insert and evaluate cast later in compilation (like vectorizer) or runtime (GenericUDFOpNumeric)

> Vectorization Udf: GenericUDFConcat for non-string columns input, is not supported
> ----------------------------------------------------------------------------------
>
>                 Key: HIVE-7160
>                 URL: https://issues.apache.org/jira/browse/HIVE-7160
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 0.14.0
>            Reporter: Gopal V
>            Assignee: Navis
>            Priority: Minor
>         Attachments: HIVE-7160.1.patch.txt
>
>
> simple UDF missing vectorization - simple example would be 
> hive> explain select concat( l_orderkey, ' msecs') from lineitem;
> is not vectorized while
> hive>  explain select concat(cast(l_orderkey as string), ' msecs') from lineitem;
> can be vectorized.
> {code}
> 14/05/31 15:28:59 [main]: DEBUG vector.VectorizationContext: No vector udf found for GenericUDFConcat, descriptor: Argument Count = 2, mode = PROJECTION, Argument Types = {LONG, STRING}, Input Expression Types = {COLUMN,COLUMN}
> 14/05/31 15:28:59 [main]: DEBUG physical.Vectorizer: Failed to vectorize
> org.apache.hadoop.hive.ql.metadata.HiveException: Udf: GenericUDFConcat, is not supported
>         at org.apache.hadoop.hive.ql.exec.vector.VectorizationContext.getGenericUdfVectorExpression(VectorizationContext.java:918)
> {code}



--
This message was sent by Atlassian JIRA
(v6.2#6252)