You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/09/16 09:11:19 UTC
[GitHub] [incubator-doris] xionglei0 opened a new issue #1809: support udtf:user defined table generation
xionglei0 opened a new issue #1809: support udtf:user defined table generation
URL: https://github.com/apache/incubator-doris/issues/1809
we need to explode one line to multi lines,like json string or array string
this is what udtf do, like table test_udtf:
**select * from test_udtf;**
+-------------+------------+--+
| pageid | adid_list |
+-------------+------------+--+
| front_page | [1,2,3] |
| end_page | [4,3,6] |
+-------------+------------+--+
hive implements udtf like this:
grammer one: **select pageid, score from test_udtf1 lateral view explode(adid_list) scores as score;**
Grammer two: **select pageid, explode(adid_list) as score from test_udtf ;**
+-------------+--------+--+
| pageid | score |
+-------------+--------+--+
| front_page | 1 |
| front_page | 2 |
| front_page | 3 |
| end_page | 4 |
| end_page | 3 |
| end_page | 6 |
+-------------+--------+--+
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org