Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-1954

SqlValidator need to maintain forceNullable across joins and renaming

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.14.0
    • Component/s: None
    • Labels:
      None

      Description

      In the following query below, SqlValidator return rowtype with the second column as NOT NULL. Since this is a left outer join, it should be nullable.

      select * from
        (select row_number() over (order by sal) from emp) as emp1(r1) 
        left outer join 
        (select  dense_rank() over(order by sal) from emp) as emp2(r2) 
        on (emp1.r1 = emp2.r2)
      

        Activity

        Hide
        minjikim MinJi Kim added a comment -

        A small patch, but would appreciate another set of eyes to review this. Thank you!

        https://github.com/apache/calcite/pull/522

        Show
        minjikim MinJi Kim added a comment - A small patch, but would appreciate another set of eyes to review this. Thank you! https://github.com/apache/calcite/pull/522
        Hide
        julianhyde Julian Hyde added a comment -

        Reviewing and testing now.

        Show
        julianhyde Julian Hyde added a comment - Reviewing and testing now.
        Show
        julianhyde Julian Hyde added a comment - Fixed in http://git-wip-us.apache.org/repos/asf/calcite/commit/22e5cfc0 .
        Hide
        michaelmior Michael Mior added a comment -

        Resolved in release 1.14.0 (2017-10-01)

        Show
        michaelmior Michael Mior added a comment - Resolved in release 1.14.0 (2017-10-01)

          People

          • Assignee:
            julianhyde Julian Hyde
            Reporter:
            minjikim MinJi Kim
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development