Uploaded image for project: 'Tajo (Retired)'
  1. Tajo (Retired)
  2. TAJO-363

Columns in subquery schema cannot be resolved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • 0.13.0
    • None

    Description

      See the below SQL statement. This statement contains a subquery with schema binding. Currently, LogicalPlanner cannot recognize subquery schema. So, the below statement causes "no such a column name exception".

      select 
        c_count, 
        count(*) as custdist 
      from 
      ( 
        select 
          c_custkey, 
          count(o_orderkey) 
        from 
          customer left outer join 
          orders 
            on c_custkey = o_custkey and 
            o_comment not like '%special%requests%' 
        group by 
          c_custkey 
      
      ) as c_orders (c_custkey, c_count) 
      
      group by 
      	c_count 
      order by 
      	custdist desc, c_count desc;
      
      
      ERROR: no such a column name c_count
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              hyunsik Hyunsik Choi
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated: