You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hivemall.apache.org by "Makoto Yui (Jira)" <ji...@apache.org> on 2019/12/18 06:50:00 UTC
[jira] [Commented] (HIVEMALL-264) pivot/unpivot UDF
[ https://issues.apache.org/jira/browse/HIVEMALL-264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16998854#comment-16998854 ]
Makoto Yui commented on HIVEMALL-264:
-------------------------------------
possible query interface.
{code:java}
SELECT
l.uid,
r.*
from
htable l
LATERAL VIEW pivot(key, value) as r
SELECT
l.uid,
r.key,
r.value
FROM
htable l
LATERAL VIEW unpivot(array('k1','k2','k3'), l.c1, l.c2, l.c3) r as key, value
{code}
Hive UDF cannot use column names
https://issues.apache.org/jira/browse/HIVE-3491
> pivot/unpivot UDF
> -----------------
>
> Key: HIVEMALL-264
> URL: https://issues.apache.org/jira/browse/HIVEMALL-264
> Project: Hivemall
> Issue Type: Wish
> Reporter: Makoto Yui
> Priority: Minor
>
> Support pivot/unpivot UDF.
> [https://support.treasuredata.com/hc/en-us/articles/360001451248-Hive-Presto-Standard-SQL-Tips]
> [https://docs.snowflake.net/manuals/sql-reference/constructs/pivot.html]
--
This message was sent by Atlassian Jira
(v8.3.4#803005)