flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-7854) Reject lateral table outer joins with predicates in SQL
Date Thu, 19 Oct 2017 10:31:00 GMT

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

ASF GitHub Bot commented on FLINK-7854:
---------------------------------------

Github user fhueske commented on a diff in the pull request:

    https://github.com/apache/flink/pull/4846#discussion_r145661230
  
    --- Diff: flink-libraries/flink-table/src/main/scala/org/apache/flink/table/calcite/FlinkCalciteSqlValidator.scala
---
    @@ -48,4 +49,19 @@ class FlinkCalciteSqlValidator(
           insert: SqlInsert): RelDataType = {
         typeFactory.asInstanceOf[JavaTypeFactory].toSql(targetRowType)
       }
    +
    +  override def validateJoin(join: SqlJoin, scope: SqlValidatorScope): Unit = {
    +    // Due to the improperly translation of lateral table left outer join (see CALCITE-2004),
we
    +    // need to temporarily forbid the common predicates until the problem is fixed.
    +    // The check for join with a lateral table is actually quite tricky.
    +    if (join.getJoinType == JoinType.LEFT &&
    +      join.getRight.toString.startsWith("TABLE(")) { // TABLE (`func`(`foo`)) AS...
    --- End diff --
    
    Yes, you are right.
    Let's go for your proposal :-)
    Thanks!


> Reject lateral table outer joins with predicates in SQL
> -------------------------------------------------------
>
>                 Key: FLINK-7854
>                 URL: https://issues.apache.org/jira/browse/FLINK-7854
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>            Reporter: Xingcan Cui
>            Assignee: Xingcan Cui
>            Priority: Blocker
>             Fix For: 1.4.0
>
>
> Due to CALCITE-2004, lateral table outer joins can not be normally executed. We should
cover it up by rejecting join predicates temporarily, until the issue is fixed in Calcite.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message