Uploaded image for project: 'Apache Drill'
  1. Apache Drill
  2. DRILL-6773

The renamed schema with aliases is not shown for queries on empty directories

    XMLWordPrintableJSON

Details

    Description

      The query is not working:

      0: jdbc:drill:zk=local> select WeekId, Product as ProductName from (select CAST(`dir0` as INT) AS WeekId, Product from dfs.`/tmp/empty_dir`);
      +--+
      | |
      +--+
      +--+
      No rows selected (0.197 seconds)
      

      but the following query without aliases works fine:

      0: jdbc:drill:zk=local> select WeekId, Product from (select CAST(`dir0` as INT) AS WeekId, Product from dfs.`/tmp/empty_dir`);
      +---------+----------+
      | WeekId | Product |
      +---------+----------+
      +---------+----------+
      No rows selected (0.276 seconds)
      

      outProj for ProjectPrel was introduced in DRILL-5546. It marks top level Projects, which schema should be shown in result output.
      ProjectAllowDupPrel should have the same.

      Attachments

        Issue Links

          Activity

            People

              vitalii Vitalii Diravka
              vitalii Vitalii Diravka
              Arina Ielchiieva Arina Ielchiieva
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: