You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Josson Paul <jo...@gmail.com> on 2016/11/10 18:58:39 UTC

SYSTEM ERROR: CompileException

Hi,

  My query is below

select MIN(case when (CMP__acIds like '%6%') then A__ln__intrRt else
null end) acID2,MIN(case when (A__ln__intrRt > 4.0) then 1 else null
end) acID1,MIN(case when (A__ln__intrRt > 4.0) and CMP__acIds like
'%6%' then 1 else null end) acID3 from <table name>


The above query returns
org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
CompileException: Line 151, Column 22: Statement "break AndOP0" is not
enclosed by a breakable statement with label "AndOP0" Fragment 1:0

I am using drill 1.8

If I make different values for A__ln__intrRt greater than condition, then
the query works. If both values are same, the query gives above error.
Currently as you see in the query, both have 4.0 as values. Another way to
make this query works is to remove one of the select field
-- 
Thanks
Josson

Re: SYSTEM ERROR: CompileException

Posted by Jinfeng Ni <jn...@apache.org>.
Is this same issue as DRILL-4971?


https://issues.apache.org/jira/browse/DRILL-4971

On Fri, Nov 11, 2016 at 10:53 AM, rahul challapalli
<ch...@gmail.com> wrote:
> This is a bug and its weird that changing the literal in the condition
> makes it work. Can you go ahead and raise a jira for the same?
>
> On Thu, Nov 10, 2016 at 10:58 AM, Josson Paul <jo...@gmail.com> wrote:
>
>> Hi,
>>
>>   My query is below
>>
>> select MIN(case when (CMP__acIds like '%6%') then A__ln__intrRt else
>> null end) acID2,MIN(case when (A__ln__intrRt > 4.0) then 1 else null
>> end) acID1,MIN(case when (A__ln__intrRt > 4.0) and CMP__acIds like
>> '%6%' then 1 else null end) acID3 from <table name>
>>
>>
>> The above query returns
>> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
>> CompileException: Line 151, Column 22: Statement "break AndOP0" is not
>> enclosed by a breakable statement with label "AndOP0" Fragment 1:0
>>
>> I am using drill 1.8
>>
>> If I make different values for A__ln__intrRt greater than condition, then
>> the query works. If both values are same, the query gives above error.
>> Currently as you see in the query, both have 4.0 as values. Another way to
>> make this query works is to remove one of the select field
>> --
>> Thanks
>> Josson
>>

Re: SYSTEM ERROR: CompileException

Posted by rahul challapalli <ch...@gmail.com>.
This is a bug and its weird that changing the literal in the condition
makes it work. Can you go ahead and raise a jira for the same?

On Thu, Nov 10, 2016 at 10:58 AM, Josson Paul <jo...@gmail.com> wrote:

> Hi,
>
>   My query is below
>
> select MIN(case when (CMP__acIds like '%6%') then A__ln__intrRt else
> null end) acID2,MIN(case when (A__ln__intrRt > 4.0) then 1 else null
> end) acID1,MIN(case when (A__ln__intrRt > 4.0) and CMP__acIds like
> '%6%' then 1 else null end) acID3 from <table name>
>
>
> The above query returns
> org.apache.drill.common.exceptions.UserRemoteException: SYSTEM ERROR:
> CompileException: Line 151, Column 22: Statement "break AndOP0" is not
> enclosed by a breakable statement with label "AndOP0" Fragment 1:0
>
> I am using drill 1.8
>
> If I make different values for A__ln__intrRt greater than condition, then
> the query works. If both values are same, the query gives above error.
> Currently as you see in the query, both have 4.0 as values. Another way to
> make this query works is to remove one of the select field
> --
> Thanks
> Josson
>