[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17336412#comment-17336412 ] Flink Jira Bot commented on FLINK-14173: This issue was labeled "stale-major" 7 ago and has not received any updates so it is being deprioritized. If this ticket is actually Major, please raise the priority and ask a committer to assign you the issue or revive the public discussion. > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Labels: stale-major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17328265#comment-17328265 ] Flink Jira Bot commented on FLINK-14173: This major issue is unassigned and itself and all of its Sub-Tasks have not been updated for 30 days. So, it has been labeled "stale-major". If this ticket is indeed "major", please either assign yourself or give an update. Afterwards, please remove the label. In 7 days the issue will be deprioritized. > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Labels: stale-major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16936942#comment-16936942 ] Benoît Paris commented on FLINK-14173: -- @[~lzljs3620320], ah I get it. The WHERE will try to evaluate the right side filtering when no values are matched. I guess I should work on my Three-Valued Logic. > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16936860#comment-16936860 ] Jingsong Lee commented on FLINK-14173: -- Hi [~BenoitParis] , the different semantics is: 1.Condition in WHERE clause: be used to filter data after join. 2.Condition in ON clause: it will affect left outer join(UDTF only support left join), when condition is false, should emit data with right null values instead of filtering out data. [~docete] You are right, we should support it, the reason is that this condition will be pulled up to calc node instead of staying in the join node. This is wrong for left join. But at the least, we can support this ANSI-style join for inner join. > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16936737#comment-16936737 ] Zhenghua Gao commented on FLINK-14173: -- [~jark] [~BenoitParis] For Temporal Join case, we do not support ANSI-style join. See LogicalCorrelateToTemporalTableJoinRule. For regular UDTF, I think we should support ANSI-style join. But there may be some problem to de-correlate query whois table function and on clause reference left table. > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16936597#comment-16936597 ] Benoît Paris commented on FLINK-14173: -- Hi [~jark]! I was so sure I used the ANSI-style, I guess my memory is playing trick on me. Out of curiosity, what are these different semantics? Thanks to you guys for all the work on Flink! Cheers > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)
[jira] [Commented] (FLINK-14173) ANSI-style JOIN with Temporal Table Function fails
[ https://issues.apache.org/jira/browse/FLINK-14173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16936463#comment-16936463 ] Jark Wu commented on FLINK-14173: - Hi [~BenoitParis], AFAIK, we don't support {{JOIN UDTF ON }} (the same for temporal table function). ON clause it not the same as WHERE clause, they have different semantics. > ANSI-style JOIN with Temporal Table Function fails > -- > > Key: FLINK-14173 > URL: https://issues.apache.org/jira/browse/FLINK-14173 > Project: Flink > Issue Type: Bug > Components: Table SQL / Legacy Planner, Table SQL / Planner >Affects Versions: 1.9.0 > Environment: Java 1.8, Scala 2.11, Flink 1.9 (pom.xml file attached) >Reporter: Benoît Paris >Priority: Major > Attachments: flink-test-temporal-tables-1.9.zip > > > The planner fails to generate a plan for ANSI-style joins with Temporal Table > Functions. The Blink planners throws with a "Missing conversion is > LogicalTableFunctionScan[convention: NONE -> LOGICAL]" message (and some very > fancy graphviz stuff). The old planner does a "This exception indicates that > the query uses an unsupported SQL feature." > This fails: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > JOIN LATERAL TABLE (Rates(o_proctime)) >ON r_currency = o_currency {code} > This works: > {code:java} > SELECT >o_amount * r_amount AS amount > FROM Orders > , LATERAL TABLE (Rates(o_proctime)) > WHERE r_currency = o_currency{code} > Reproduction with the attached Java and pom.xml files. Also included: stack > traces for both Blink and the old planner. > I think this is a regression. I remember using ANSI-style joins with a > temporal table function successfully in 1.8. -- This message was sent by Atlassian Jira (v8.3.4#803005)