hadoop-hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Zheng Shao (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HIVE-164) Support CASE statement using GenericUDF
Date Tue, 28 Apr 2009 01:05:30 GMT

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

Zheng Shao commented on HIVE-164:
---------------------------------

> A question - In most of the xyzOperator.java code the InspectableObjects have been done
away with and replaced with ObjectInspector + Object. Why?
Because we don't need InspectableObject there any more - exprNodeEvaluators are dealing with
Inspector in initialize and Object in evaluate, so we don't need a wrapper like InspectableObject
like before. This takes advantage of the fact that the ObjectInspector that gets passed via
InspectableObject is always the same. This also makes the code clearer because developers
can directly see that fact. It also improves the performance a little bit because we are doing
one less level of indirection.

I don't foresee any places that we would need InspectableObject in the future - it was added
as a replacement for HiveObject long time back. Since we are moving the Inspector part to
compile time or execution-initialization time, I don't see any places we need to pass Object
and ObjectInspector at the same time.

> I suppose you are going to subsume tag within the row as that makes serialization and
deserialization of tag easy. Not sure if you are tackling this as part of HIVE-450. If yes
then please ignore this comment.
I plan to do that with HIVE-405 since this one has taken too long and introduced a lot of
conflicts along the way.


> Support CASE statement using GenericUDF
> ---------------------------------------
>
>                 Key: HIVE-164
>                 URL: https://issues.apache.org/jira/browse/HIVE-164
>             Project: Hadoop Hive
>          Issue Type: New Feature
>          Components: Query Processor
>    Affects Versions: 0.4.0
>            Reporter: Zheng Shao
>            Assignee: Zheng Shao
>             Fix For: 0.4.0
>
>         Attachments: HIVE-164.4.patch, HIVE-164.5.patch, HIVE-164.6.code-only.patch,
HIVE-164.6.patch, HIVE-164.7.code-only.patch, HIVE-164.7.patch, HIVE-164.8.patch
>
>
> See http://dev.mysql.com/doc/refman/5.0/en/control-flow-functions.html for details.
> Syntax:
> {code}
> CASE value WHEN [compare_value] THEN result [WHEN [compare_value] THEN result ...] [<ELSE
result] END
> CASE WHEN [condition] THEN result [WHEN [condition] THEN result ...] [ELSE result] END

> {code}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message