Hi All!

Playing around with the SQL syntax for temporal join with latest table I
feel there is some room for optimizing the current syntax to provide a
better user experience.

The current system for specifying the lookup side is:

lookuptable FOR SYSTEM_TIME AS OF probe.proctime_column

It feels a bit clumsy to have to define a proctime() column in the probe
table as I think it brings no real syntactic value and just introduces an
overhead.

I think we should allow the following syntax instead:

lookuptable FOR SYSTEM_TIME AS OF proctime()

To me this means the same thing and Flink can easily map it to the same
lookup join operator. Playing around with the planner logic, this is
surprisingly simple to implement (basicly just a 2 line change).

It would be good to hear some SQL expert opinions of any potential downside
to this. If this makes sense I am happy to contribute this change.

Cheers,
Gyula

Reply via email to