[ https://issues.apache.org/jira/browse/FLINK-9716?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16585847#comment-16585847 ]
Piotr Nowojski commented on FLINK-9716: --------------------------------------- Thanks [~RuidongLi] for linking to the other issue. Support scans from table version functions (TVF/Temporal Tables) was indeed blocked on FLINK-8868, however that's not full story. For scans like: SELECT * FROM Rates(SOME_TIME_STAMP) we need to filter out results that are newer then `SOME_TIME_STAMP` and present only the latest versions of rows for the given primary for before `SOME_TIME_STAMP`. For example if there are 3 versions for a key in MyTable: ||key||value||timestamp|| |A|42|1| |A|44|5| |A|1337|10| query: {code:java} SELECT * FROM LATERAL TABLE(MyTable(7)){code} should return: ||key||value||timestamp|| |A|44|5| Also this ticket would need to be a work on top of planning code from: [https://github.com/apache/flink/pull/6299] (https://issues.apache.org/jira/browse/FLINK-9713) > Support scans from table version function > ----------------------------------------- > > Key: FLINK-9716 > URL: https://issues.apache.org/jira/browse/FLINK-9716 > Project: Flink > Issue Type: Sub-task > Reporter: Piotr Nowojski > Assignee: Ruidong Li > Priority: Major > > Given TVF of {{Rates}} this should work: > > {code:java} > SELECT * FROM Rates(2016-06-27 10:10:42.123) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)