You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@drill.apache.org by "Vitalii Diravka (JIRA)" <ji...@apache.org> on 2017/03/22 16:53:41 UTC
[jira] [Commented] (DRILL-4971) query encounters system error:
Statement "break AndOP3" is not enclosed by a breakable statement with
label "AndOP3"
[ https://issues.apache.org/jira/browse/DRILL-4971?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15936671#comment-15936671 ]
Vitalii Diravka commented on DRILL-4971:
----------------------------------------
Braces near the "AndOP" label are absent for "booleanAND" block in generated code.
The same problem with "booleanOR" expression:
{code}
SELECT
CASE WHEN employee_id IN (1) THEN 1 ELSE 0 END `first`
, CASE WHEN employee_id IN (2) THEN 1 ELSE 0 END `second`
, CASE WHEN employee_id IN (1, 2) THEN 1 ELSE 0 END `any`
FROM cp.`employee.json` ORDER BY employee_id limit 2;
{code}
Workaround for the above query can be reordering of the statements:
{code}
SELECT
CASE WHEN employee_id IN (1) THEN 1 ELSE 0 END `first`
, CASE WHEN employee_id IN (1, 2) THEN 1 ELSE 0 END `any`
, CASE WHEN employee_id IN (2) THEN 1 ELSE 0 END `second`
FROM cp.`employee.json` ORDER BY employee_id limit 2;
{code}
> query encounters system error: Statement "break AndOP3" is not enclosed by a breakable statement with label "AndOP3"
> --------------------------------------------------------------------------------------------------------------------
>
> Key: DRILL-4971
> URL: https://issues.apache.org/jira/browse/DRILL-4971
> Project: Apache Drill
> Issue Type: Bug
> Components: Execution - Flow
> Reporter: Robert Hou
> Assignee: Vitalii Diravka
> Attachments: low_table, medium_table
>
>
> 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
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)