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

Failure when trying to sort on column that is not selected

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Blocker
    • Resolution: Fixed
    • None
    • 0.4.0
    • SQL Parser
    • None

    Description

      When running a query where the order by clause includes a column that is not in the selection, we get index out of bounds exception:

      jdbc:drill:zk=local> select a from data order by a, b;
      Query failed: org.apache.drill.exec.rpc.RpcException: Remote failure while running query.[error_id: "49cb54dd-00cf-4f44-8f01-979471f32cf7"
      endpoint {
      address: "localhost"
      user_port: 31010
      control_port: 31011
      data_port: 31012
      }
      error_type: 0
      message: "Failure while setting up Foreman. < AssertionError:[ Internal error: Error while applying rule ExpandConversionRule, args [rel#2061:AbstractConverter.LOGICAL.ANY([]).[0, 1](child=rel#2053:Subset#3.LOGICAL.ANY([]).[],convention=LOGICAL,DrillDistributionTraitDef=ANY([]),sort=[0, 1])] ] < IndexOutOfBoundsException:[ index (1) must be less than size (1) ]"
      ]

      Attachments

        Activity

          People

            DrillCommitter DrillCommitter
            sphillips Steven Phillips
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: