Details

    • Type: New Feature New Feature
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1.0
    • Labels:
    • Environment:

      Running Drill on MacOSX standalone.
      #Sun Jul 20 20:12:53 PDT 2014
      git.commit.id.abbrev=e5c2da0

      Description

      A query that selects a compatible column from the same JSON file on either side of the UNION operator fails. The same query works if UNION ALL is used.

      Example of Failure:
      0: jdbc:drill:zk=local> select id from dfs.`/Users/brumsby/drill/donuts.json` union select id from dfs.`/Users/brumsby/drill/donuts.json`;
      Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "dfe76b6b-7eb0-49ee-8084-1e29ea995be0"
      endpoint

      { address: "10.250.0.28" user_port: 31010 control_port: 31011 data_port: 31012 }

      error_type: 0
      message: "Failure while parsing sql. < CannotPlanException:[ Node [rel#880:Subset#6.PHYSICAL.SINGLETON([]).[]] could not be implemented; planner state:
      ...

      Same query with UNION ALL (which works):

      0: jdbc:drill:zk=local> select id from dfs.`/Users/brumsby/drill/donuts.json` union all select id from dfs.`/Users/brumsby/drill/donuts.json`;
      ------------

      id

      ------------

      0001
      0001

      ------------
      2 rows selected (0.111 seconds)

        Activity

        Hide
        Jacques Nadeau added a comment -

        Drill doesn't support a distinct UNION yet. Currently only UNION ALL is supported.

        Show
        Jacques Nadeau added a comment - Drill doesn't support a distinct UNION yet. Currently only UNION ALL is supported.
        Hide
        Sean Hsuan-Yi Chu added a comment -

        A temporary solution is to use distinct over Union-All as a work around.

        Show
        Sean Hsuan-Yi Chu added a comment - A temporary solution is to use distinct over Union-All as a work around.
        Hide
        Sean Hsuan-Yi Chu added a comment -

        A patch is under review:
        https://reviews.apache.org/r/35163/

        Show
        Sean Hsuan-Yi Chu added a comment - A patch is under review: https://reviews.apache.org/r/35163/
        Hide
        Sean Hsuan-Yi Chu added a comment -

        Resolved in commit#: d5dc322d51f00f0ba9bde7022b164a409d3ca518

        Show
        Sean Hsuan-Yi Chu added a comment - Resolved in commit#: d5dc322d51f00f0ba9bde7022b164a409d3ca518

          People

          • Assignee:
            Sean Hsuan-Yi Chu
            Reporter:
            Bob Rumsby
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development