I try something like this:

Iterate until you find the your window rel and then

LogicalWindow windowAgg = (LogicalWindow) rel;
int windowRange = createWindowFrame(windowAgg.getConstants());

...

private int createWindowFrame(List<RexLiteral> constants) { int windowFrame
= 0; for ( RexLiteral con : constants) windowFrame +=
Integer.parseInt(con.toString()); // fix unbounded window range //if
(windowFrame == 0) // windowFrame++; return windowFrame; }

2017-02-09 15:19 GMT+02:00 Stefano Bortoli <stefano.bort...@huawei.com>:

> Hi all,
>
>
>
> I am new to the community and I  am still figuring out things. So please,
> apologize if I am not precise enough.
>
>
>
> I am trying to work with streaming windows, and I would need to access
> some values related to the boundaries of the window.
>
>
>
> So far, the way I found was to use the window group keys, and use its
> first value to get a value from the window.constants lists.
>
> **************
>
> Integer lowerBoundKey = group.keys.asList().get(0);
>
> Object lowerbound = constants.get(lowerBoundKey).getValue2();
>
> **************
>
> However, this method seems to be a little arbitrary as I would expect to
> be using the lowerbound offset somehow.
>
>
>
> Intuitively, I was expecting to use the lowerbound offset name or index
> position to get the value from somewhere, but I am having problems
> understanding how. I feel I am missing something, and I would be grateful
> if someone can give me some hint about it.
>
> Thanks a lot in advance!
> Stefano
>
>

Reply via email to