You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@phoenix.apache.org by Krishna <re...@gmail.com> on 2018/01/17 02:07:58 UTC

UDF for lateral views

I would like to convert a column of ARRAY data-type such that each element
of the array is returned as a row. Hive supports it via Lateral Views (
https://cwiki.apache.org/confluence/display/Hive/LanguageManual+LateralView
)?

Does UDF framework in Phoenix allow for building such functions?

Re: UDF for lateral views

Posted by James Taylor <ja...@apache.org>.
No, this isn't supported from a UDF. You're looking for PHOENIX-4311 to be
implemented. Let's continue the discussion there.

On Wed, Jan 17, 2018 at 7:16 PM, Krishna <re...@gmail.com> wrote:

> According to this blog (http://phoenix-hbase.blogspot.in/2013/04/how-to-
> add-your-own-built-in-function.html), evaluate(...) is responsible for
> processing the input state of the row and filling up ImmutableBytesWritable
> pointer with transformed row.
> Did not find any references that'll support returning multiple rows for
> each input row. Does anyone know if UDF framework can support that?
>
> On Tue, Jan 16, 2018 at 6:07 PM, Krishna <re...@gmail.com> wrote:
>
>> I would like to convert a column of ARRAY data-type such that each
>> element of the array is returned as a row. Hive supports it via Lateral
>> Views (https://cwiki.apache.org/confluence/display/Hive/LanguageMa
>> nual+LateralView)?
>>
>> Does UDF framework in Phoenix allow for building such functions?
>>
>
>

Re: UDF for lateral views

Posted by James Taylor <ja...@apache.org>.
No, this isn't supported from a UDF. You're looking for PHOENIX-4311 to be
implemented. Let's continue the discussion there.

On Wed, Jan 17, 2018 at 7:16 PM, Krishna <re...@gmail.com> wrote:

> According to this blog (http://phoenix-hbase.blogspot.in/2013/04/how-to-
> add-your-own-built-in-function.html), evaluate(...) is responsible for
> processing the input state of the row and filling up ImmutableBytesWritable
> pointer with transformed row.
> Did not find any references that'll support returning multiple rows for
> each input row. Does anyone know if UDF framework can support that?
>
> On Tue, Jan 16, 2018 at 6:07 PM, Krishna <re...@gmail.com> wrote:
>
>> I would like to convert a column of ARRAY data-type such that each
>> element of the array is returned as a row. Hive supports it via Lateral
>> Views (https://cwiki.apache.org/confluence/display/Hive/LanguageMa
>> nual+LateralView)?
>>
>> Does UDF framework in Phoenix allow for building such functions?
>>
>
>

Re: UDF for lateral views

Posted by Krishna <re...@gmail.com>.
According to this blog (
http://phoenix-hbase.blogspot.in/2013/04/how-to-add-your-own-built-in-function.html),
evaluate(...) is responsible for processing the input state of the row and
filling up ImmutableBytesWritable pointer with transformed row.
Did not find any references that'll support returning multiple rows for
each input row. Does anyone know if UDF framework can support that?

On Tue, Jan 16, 2018 at 6:07 PM, Krishna <re...@gmail.com> wrote:

> I would like to convert a column of ARRAY data-type such that each element
> of the array is returned as a row. Hive supports it via Lateral Views (
> https://cwiki.apache.org/confluence/display/Hive/
> LanguageManual+LateralView)?
>
> Does UDF framework in Phoenix allow for building such functions?
>

Re: UDF for lateral views

Posted by Krishna <re...@gmail.com>.
According to this blog (
http://phoenix-hbase.blogspot.in/2013/04/how-to-add-your-own-built-in-function.html),
evaluate(...) is responsible for processing the input state of the row and
filling up ImmutableBytesWritable pointer with transformed row.
Did not find any references that'll support returning multiple rows for
each input row. Does anyone know if UDF framework can support that?

On Tue, Jan 16, 2018 at 6:07 PM, Krishna <re...@gmail.com> wrote:

> I would like to convert a column of ARRAY data-type such that each element
> of the array is returned as a row. Hive supports it via Lateral Views (
> https://cwiki.apache.org/confluence/display/Hive/
> LanguageManual+LateralView)?
>
> Does UDF framework in Phoenix allow for building such functions?
>