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

Unable to apply Union on multiple select query expressions

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.10.0, 1.11.0
    • Future
    • Client - JDBC
    • None

    Description

      Unable to combine the result sets of more than two separate query expressions

      example :

      select color, Paul , 'Paul' name
      from mysql.devcdp25.pivtest
      union all
      select color, John , 'John' name
      from mysql.devcdp25.pivtest
      union all
      select color, Tim , 'Tim' name
      from mysql.devcdp25.pivtest

      Query Failed: An Error Occurred
      org.apache.drill.common.exceptions.UserRemoteException: DATA_READ ERROR: The JDBC storage plugin failed while trying setup the SQL query. sql SELECT * FROM (SELECT `color`, `Paul`, 'Paul' AS `name` FROM `devcdp25`.`pivtest` UNION ALL SELECT `color`, `John`, 'John' AS `name` FROM `devcdp25`.`pivtest`) UNION ALL SELECT `color`, `Tim`, 'Tim' AS `name` FROM `devcdp25`.`pivtest` plugin mysql Fragment 0:0

      it is desirable to support combining multiple result sets in a single query
      note: the same works fine in MySQL

      Attachments

        Activity

          People

            Unassigned Unassigned
            Rajeshwar.Rao Rajeshwar Rao
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: