You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@phoenix.apache.org by Cheyenne Forbes <ch...@gmail.com> on 2017/03/25 15:27:15 UTC

Get the Region and ID of the current row in a UDF

Is it possible to get the Region and ID of the current row in evaluate()
when creating a user defined function?

Re: Get the Region and ID of the current row in a UDF

Posted by James Taylor <ja...@apache.org>.
No.

On Tue, Mar 28, 2017 at 10:19 AM Cheyenne Forbes <
cheyenne.osanu.forbes@gmail.com> wrote:

> So I cant get neither the name of the table, the name of the column, the
> id of the row nor the region that "ptr" belongs to after calling:
>
>
>
>
>
> *        Expression arg = getChildren().get(0);        if
> (!arg.evaluate(tuple, ptr)) {            return false;        }*
>

Re: Get the Region and ID of the current row in a UDF

Posted by Cheyenne Forbes <ch...@gmail.com>.
So I cant get neither the name of the table, the name of the column, the id
of the row nor the region that "ptr" belongs to after calling:




*        Expression arg = getChildren().get(0);        if
(!arg.evaluate(tuple, ptr)) {            return false;        }*

Re: Get the Region and ID of the current row in a UDF

Posted by James Taylor <ja...@apache.org>.
No, that's not possible. Keep in mind that these expressions may be
evaluated on the client or the server (it depends on the query). The could
be evaluated on post aggregated rows too where the idea of which region no
longer makes sense.

On Sat, Mar 25, 2017 at 10:15 PM Cheyenne Forbes <
cheyenne.osanu.forbes@gmail.com> wrote:

> or get the region of the table after calling:
>
>
>
>
> *        Expression arg = getChildren().get(0);        if
> (!arg.evaluate(tuple, ptr)) {            return false;        }*
>

Re: Get the Region and ID of the current row in a UDF

Posted by Cheyenne Forbes <ch...@gmail.com>.
or get the region of the table after calling:




*        Expression arg = getChildren().get(0);        if
(!arg.evaluate(tuple, ptr)) {            return false;        }*

Re: Get the Region and ID of the current row in a UDF

Posted by Cheyenne Forbes <ch...@gmail.com>.
Anyone?