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] Updated: (HIVE-857) Transform should produce objects in the same type as specified at runtime
Date Sat, 26 Sep 2009 00:51:16 GMT

     [ https://issues.apache.org/jira/browse/HIVE-857?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Zheng Shao updated HIVE-857:
----------------------------

    Attachment: HIVE-857.1.patch

This patch is mainly a subset of HIVE-708, which does NOT include TypedBytes. TypedBytes is
a new feature - we do not need to propagate it back to branch-0.4.

> Transform should produce objects in the same type as specified at runtime
> -------------------------------------------------------------------------
>
>                 Key: HIVE-857
>                 URL: https://issues.apache.org/jira/browse/HIVE-857
>             Project: Hadoop Hive
>          Issue Type: Bug
>    Affects Versions: 0.4.0, 0.4.1
>            Reporter: Zheng Shao
>         Attachments: HIVE-857.1.patch
>
>
> The following code fails at runtime, because the "clicked" field produced by "transform"
is actually of type String at runtime, instead of boolean.
> {code}
> INSERT OVERWRITE TABLE feature_index
> SELECT
>  temp.feature,
>  temp.ad_id,
>  sum(if(temp.clicked, 1, 0)) / cast(count(temp.clicked) as DOUBLE) as clicked_percent
> FROM (
>  SELECT concat('ua:', trim(lower(ua.feature))) as feature, ua.ad_id, ua.clicked
>  FROM (
>   MAP raw_logs.user_agent, raw_logs.ad_id, raw_logs.clicked
>   USING 'my.py' as (feature STRING, ad_id STRING, clicked BOOLEAN)
>   FROM raw_logs
>  ) ua
> ) temp
> GROUP BY temp.feature, temp.ad_id;
> {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