You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@drill.apache.org by Nirav Shah <ni...@games24x7.com> on 2015/12/21 09:49:12 UTC

issue with where clause

Hi,


I am put up in strange situation.

select count(distinct case when misfmg = 'true' then sessionid end)  nnn
from   t196 t  where channelid = 2 and id = '/confirmDrop/btnYes/' and
event='click'    and mprizetype= 1 and mgametype = 'cfp'  ;

is running fine and giving expected results but

select count(distinct sessionid) from   t196 t  where channelid = 2 and id
= '/confirmDrop/btnYes/' and  event='click'    and mprizetype= 1 and
mgametype = 'cfp' and misfmg is null ;

is giving below error.

Error: SYSTEM ERROR: StringIndexOutOfBoundsException: String index out of
range: -5

while I remove this where condition it works fine.

select count(distinct sessionid) from   t196 t  where channelid = 2 and id
= '/confirmDrop/btnYes/' and  event='click'    and mprizetype= 1 and
mgametype = 'cfp' ;

Something really strange to me.

Thanks in advance.

Regards,
Nirav

Re: issue with where clause

Posted by Aman Sinha <am...@apache.org>.
Nirav,
we would need some more details but this looks like a bug ... could you pls
create a JIRA along with the stack trace for this error? (it should be in
the drillbit.log file).   Alternatively, set the following
in your sqlline session:
   alter session set  `exec.errors.verbose` = true;
and run your query... and post the stack trace from there.

Pls put some details about the nature of the table:  is it parquet data ?
 how was it created ? any partitioning columns ? etc.

Aman

On Mon, Dec 21, 2015 at 8:43 PM, Nirav Shah <ni...@games24x7.com>
wrote:

> Can someone help me on this?
>
>
> On Mon, Dec 21, 2015 at 2:19 PM, Nirav Shah <ni...@games24x7.com>
> wrote:
>
> > Hi,
> >
> >
> > I am put up in strange situation.
> >
> > select count(distinct case when misfmg = 'true' then sessionid end)  nnn
> > from   t196 t  where channelid = 2 and id = '/confirmDrop/btnYes/' and
> > event='click'    and mprizetype= 1 and mgametype = 'cfp'  ;
> >
> > is running fine and giving expected results but
> >
> > select count(distinct sessionid) from   t196 t  where channelid = 2 and
> id
> > = '/confirmDrop/btnYes/' and  event='click'    and mprizetype= 1 and
> > mgametype = 'cfp' and misfmg is null ;
> >
> > is giving below error.
> >
> > Error: SYSTEM ERROR: StringIndexOutOfBoundsException: String index out of
> > range: -5
> >
> > while I remove this where condition it works fine.
> >
> > select count(distinct sessionid) from   t196 t  where channelid = 2 and
> id
> > = '/confirmDrop/btnYes/' and  event='click'    and mprizetype= 1 and
> > mgametype = 'cfp' ;
> >
> > Something really strange to me.
> >
> > Thanks in advance.
> >
> > Regards,
> > Nirav
> >
>

Re: issue with where clause

Posted by Nirav Shah <ni...@games24x7.com>.
Can someone help me on this?


On Mon, Dec 21, 2015 at 2:19 PM, Nirav Shah <ni...@games24x7.com>
wrote:

> Hi,
>
>
> I am put up in strange situation.
>
> select count(distinct case when misfmg = 'true' then sessionid end)  nnn
> from   t196 t  where channelid = 2 and id = '/confirmDrop/btnYes/' and
> event='click'    and mprizetype= 1 and mgametype = 'cfp'  ;
>
> is running fine and giving expected results but
>
> select count(distinct sessionid) from   t196 t  where channelid = 2 and id
> = '/confirmDrop/btnYes/' and  event='click'    and mprizetype= 1 and
> mgametype = 'cfp' and misfmg is null ;
>
> is giving below error.
>
> Error: SYSTEM ERROR: StringIndexOutOfBoundsException: String index out of
> range: -5
>
> while I remove this where condition it works fine.
>
> select count(distinct sessionid) from   t196 t  where channelid = 2 and id
> = '/confirmDrop/btnYes/' and  event='click'    and mprizetype= 1 and
> mgametype = 'cfp' ;
>
> Something really strange to me.
>
> Thanks in advance.
>
> Regards,
> Nirav
>