[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2020-01-07 Thread Jira


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17009574#comment-17009574
 ] 

Benoît Paris commented on FLINK-14200:
--

Thanks a lot for the fix [~jark] !

> 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)


[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2020-01-06 Thread Jark Wu (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17009386#comment-17009386
 ] 

Jark Wu commented on FLINK-14200:
-

1.11.0: 1121949bd6018d5c44238dc5550364285751faf9
1.10.0: 13a5cf92a1c66089a80fc03048fdb4b46c3009b0
1.9.2: TODO

> 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: 20m
>  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)


[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2020-01-05 Thread Jark Wu (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008551#comment-17008551
 ] 

Jark Wu commented on FLINK-14200:
-

Sure.

> 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: 10m
>  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)


[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2020-01-05 Thread Jingsong Lee (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17008531#comment-17008531
 ] 

Jingsong Lee commented on FLINK-14200:
--

Consider it is bug of 1.10 too, I'll set its version to 1.10 too. FYI, [~jark] 
[~BenoitParis]

> 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
>
> Attachments: 
> temporal-table-function-query-side-as-not-table-source.zip
>
>  Time Spent: 10m
>  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)


[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2019-12-10 Thread Jira


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16992428#comment-16992428
 ] 

Benoît Paris commented on FLINK-14200:
--

This issue:

https://issues.apache.org/jira/browse/FLINK-15112

seems to be the equivalent bug in the Legacy planner.

> 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
>Priority: Major
> Fix For: 1.9.2
>
> Attachments: 
> temporal-table-function-query-side-as-not-table-source.zip
>
>
> 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)


[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2019-10-14 Thread Jira


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16950839#comment-16950839
 ] 

Benoît Paris commented on FLINK-14200:
--

[As mentioned in the 
mailing-list|http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/flink-sql-table-in-subquery-join-temporal-table-raise-java-lang-NullPointerException-td30494.html]
 by another user, the following syntax fails as well:
{code:java}
SELECT o_amount * r_amount AS amount
FROM (SELECT * FROM Orders) as Orders, LATERAL TABLE (Rates(o_proctime))
WHERE r_currency = o_currency
{code}

> 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
>Priority: Major
> Fix For: 1.9.2
>
> Attachments: 
> temporal-table-function-query-side-as-not-table-source.zip
>
>
> 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)


[jira] [Commented] (FLINK-14200) Temporal Table Function Joins do not work on Tables (only TableSources) on the query side

2019-09-24 Thread Jark Wu (Jira)


[ 
https://issues.apache.org/jira/browse/FLINK-14200?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16937367#comment-16937367
 ] 

Jark Wu commented on FLINK-14200:
-

Hi [~BenoitParis], thanks for reporting this. I think this is a bug. 


> 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
>Priority: Major
> Fix For: 1.9.1
>
> Attachments: 
> temporal-table-function-query-side-as-not-table-source.zip
>
>
> 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)