You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (Jira)" <ji...@apache.org> on 2020/01/07 09:50:00 UTC
[jira] [Resolved] (FLINK-14200) Temporal Table Function Joins do
not work on Tables (only TableSources) on the query side
[ https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jark Wu resolved FLINK-14200.
-----------------------------
Resolution: Fixed
> Temporal Table Function Joins do not work on Tables (only TableSources) on the query side
> -----------------------------------------------------------------------------------------
>
> Key: FLINK-14200
> URL: https://issues.apache.org/jira/browse/FLINK-14200
> Project: Flink
> Issue Type: Bug
> Components: Table SQL / Planner
> Affects Versions: 1.9.0
> Environment: Java 8, Scala 2.11, Flink 1.9
> Reporter: Benoît Paris
> Assignee: Jark Wu
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.9.2, 1.10.0
>
> Attachments: temporal-table-function-query-side-as-not-table-source.zip
>
> Time Spent: 40m
> Remaining Estimate: 0h
>
> This only affects the Blink planner. The legacy planner works fine.
> With Orders as a TableSource, and Orders2 as a Table with the same content:
> {code:java}
> tEnv.registerTableSource("Orders", new FooSource(new String[] {"o_currency", "o_amount", "o_proctime"}));
> Table orders2 = tEnv.sqlQuery("SELECT * FROM Orders");
> tEnv.registerTable("Orders2", orders2);{code}
> This works (TableSource on the query side):
> {code:java}
> SELECT
> o_amount * r_amount AS amount
> FROM Orders
> , LATERAL TABLE (Rates(o_proctime))
> WHERE r_currency = o_currency{code}
> While this does not (Table on the query side):
> {code:java}
> SELECT
> o_amount * r_amount AS amount
> FROM Orders2
> , LATERAL TABLE (Rates(o_proctime))
> WHERE r_currency = o_currency{code}
> Throwing an NPE in FlinkRelBuilder, called from LogicalCorrelateToJoinFromTemporalTableFunctionRule. Attached is Java code for reproduction, along with the full log and stacktrace, and a pom.xml.
> EDIT: This may not be Table vs TableSource, maybe more a projection or a decorrelate issue? Don't know how the planner works well enough to characterize it better.
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)