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

Data type mismatch for union all with timestamp and date

    XMLWordPrintableJSON

Details

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

    Description

      Calcite and drill execute different implicit cast when a union all query contains timestamp and date on both right and left hand side but in different order.

      select col_tmstmp,col_date, col_boln from `prqUnAll_0_v` union all select col_date, col_tmstmp, col_boln from `prqUnAll_1_v`

      limit 0: select * from (select col_tmstmp,col_date, col_boln from `prqUnAll_0_v` union all select col_date, col_tmstmp, col_boln from `prqUnAll_1_v`) t limit 0
      limit 0: [col_tmstmp, col_date, col_boln]
      regular: [col_tmstmp, col_date, col_boln]

      limit 0: [DATE, DATE, BOOLEAN]
      regular: [TIMESTAMP, TIMESTAMP, BOOLEAN]

      limit 0: [columnNullable, columnNullable, columnNullable]
      regular: [columnNullable, columnNullable, columnNullable]

      Attachments

        Activity

          People

            seanhychu Sean Hsuan-Yi Chu
            knguyen Krystal
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: