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

Query encounters system error, when there aren't eval subexpressions of any function in boolean and/or expressions

    XMLWordPrintableJSON

Details

    Description

      This query returns an error. The stack trace suggests it might be a schema change issue, but there is no schema change in this table. Many other queries are succeeding.

      select count(*) from test where ((int_id > 3060 and int_id < 6002) or (int_id > 9025 and int_id < 11976)) and ((int_id > 9025 and int_id < 11976) or (int_id > 3060 and int_id < 6002)) and (int_id > 3060 and int_id < 6002);

      Error: SYSTEM ERROR: CompileException: Line 232, Column 30: Statement "break AndOP3" is not enclosed by a breakable statement with label "AndOP3"

      [Error Id: 254d093b-79a1-4425-802c-ade08db293e4 on qa-node211:31010]^M
      ^M
      (org.apache.drill.exec.exception.SchemaChangeException) Failure while attempting to load generated class^M
      org.apache.drill.exec.physical.impl.filter.FilterRecordBatch.generateSV2Filterer():198^M
      org.apache.drill.exec.physical.impl.filter.FilterRecordBatch.setupNewSchema():107^M
      org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():78^M

      There are two partitions to the test table. One covers the range 3061 - 6001 and the other covers the range 9026 - 11975.

      This second query returns a different, but possibly related, error.

      select count(*) from orders_parts where (((int_id > -3025 and int_id < -4) or (int_id > -5 and int_id < 3061) or (int_id > 3060 and int_id < 6002)) and (int_id > -5 and int_id < 3061)) and (((int_id > -5 and int_id < 3061) or (int_id > 9025 and int_id < 11976)) and (int_id > -5 and int_id < 3061))^M
      Failed with exception^M
      java.sql.SQLException: SYSTEM ERROR: CompileException: Line 447, Column 30: Statement "break AndOP6" is not enclosed by a breakable statement with label "AndOP6"^M
      ^M
      Fragment 0:0^M
      ^M
      [Error Id: ac09187e-d3a2-41a7-a659-b287aca6039c on qa-node209:31010]^M
      ^M
      (org.apache.drill.exec.exception.SchemaChangeException) Failure while attempting to load generated class^M
      org.apache.drill.exec.physical.impl.filter.FilterRecordBatch.generateSV2Filterer():198^M
      org.apache.drill.exec.physical.impl.filter.FilterRecordBatch.setupNewSchema():107^M
      org.apache.drill.exec.record.AbstractSingleRecordBatch.innerNext():78^M

      Attachments

        1. low_table
          205 kB
          Robert Hou
        2. medium_table
          206 kB
          Robert Hou

        Issue Links

          Activity

            People

              vitalii Vitalii Diravka
              rhou Robert Hou
              Jinfeng Ni Jinfeng Ni
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: