Conditional branching in Table API

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Conditional branching in Table API

Chen Qin
Hi there,

Is there any jira related to conditional branching support in table api?

https://calcite.apache.org/docs/reference.html#conditional-functions-and-operators

Thanks
Chen
Reply | Threaded
Open this post in threaded view
|

Re: Conditional branching in Table API

Fabian Hueske-2
Hi Chen,

with Flink 1.2, conditions in select clauses are supported in the Table API
with the following syntax:

table.select('name, 'age, ('yearOfBirth < 1997) ? ("adult", "teenager") )

See also the documentation of built-in functions [1].

Best, Fabian

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.2/dev/table_api.html#built-in-functions

2017-02-01 0:29 GMT+01:00 Chen Qin <[hidden email]>:

> Hi there,
>
> Is there any jira related to conditional branching support in table api?
>
> https://calcite.apache.org/docs/reference.html#conditional-functions-and-
> operators
>
> Thanks
> Chen
>