Expressions for Table operations (select, filter)?

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

Expressions for Table operations (select, filter)?

Stefan Winterstein
Where can I find a description of the expressions that can be used with
the Table operations, such as select() and filter()?

I've seen the examples use code like

> .select("word.count as count, word").filter("count = 2");

and

> .select("month as m, cnt.max as max")

The Table docs
(https://ci.apache.org/projects/flink/flink-docs-master/libs/table.html)
refer to the Javadocs, but they just say "field expressions can contain
complex expressions and aggregations", which doesn't really help...

And: can I reference POJO fields with these expressions?


Best,
-Stefan

Reply | Threaded
Open this post in threaded view
|

Re: Expressions for Table operations (select, filter)?

Aljoscha Krettek
Hi,
unfortunately the expression syntax is not documented right now. I'm writing documentation right now, it should be available in a few hours.

For reference, you can look at expressionDsl.scala or ExpressionParser.scala to see the expressions that are actually implemented.

Cheers,
Aljoscha

On Wed, 16 Sep 2015 at 13:32 Stefan Winterstein <[hidden email]> wrote:
Where can I find a description of the expressions that can be used with
the Table operations, such as select() and filter()?

I've seen the examples use code like

> .select("word.count as count, word").filter("count = 2");

and

> .select("month as m, cnt.max as max")

The Table docs
(https://ci.apache.org/projects/flink/flink-docs-master/libs/table.html)
refer to the Javadocs, but they just say "field expressions can contain
complex expressions and aggregations", which doesn't really help...

And: can I reference POJO fields with these expressions?


Best,
-Stefan

Reply | Threaded
Open this post in threaded view
|

Re: Expressions for Table operations (select, filter)?

Aljoscha Krettek
Hi Stefan,
I added a section in the documentation that describes the syntax of the expressions. It is a bit bare bones but I hope it helps nonetheless.


Cheers,
Aljoscha

On Wed, 16 Sep 2015 at 14:55 Aljoscha Krettek <[hidden email]> wrote:
Hi,
unfortunately the expression syntax is not documented right now. I'm writing documentation right now, it should be available in a few hours.

For reference, you can look at expressionDsl.scala or ExpressionParser.scala to see the expressions that are actually implemented.

Cheers,
Aljoscha

On Wed, 16 Sep 2015 at 13:32 Stefan Winterstein <[hidden email]> wrote:
Where can I find a description of the expressions that can be used with
the Table operations, such as select() and filter()?

I've seen the examples use code like

> .select("word.count as count, word").filter("count = 2");

and

> .select("month as m, cnt.max as max")

The Table docs
(https://ci.apache.org/projects/flink/flink-docs-master/libs/table.html)
refer to the Javadocs, but they just say "field expressions can contain
complex expressions and aggregations", which doesn't really help...

And: can I reference POJO fields with these expressions?


Best,
-Stefan