You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by Yash Sharma <ya...@gmail.com> on 2014/06/07 11:21:56 UTC

Query regarding BooleanHolder for - Drill-923

Hi Drillers,
Which holder can be used for representing boolean input data.

I have implement bool_and/bool_or (Drill-923) by using the IntHolders for
0/1 input, but could not spot a dedicated BooleanHolder for holding
true/false/0/1 values.

I want to pass the data in form:

{"A" : 7, "B" : 2,  "C" : 1, "D" : true}
> {"A" : 4, "B" : -2, "C" : 0, "D" : false}
> {"A" : 4, "B" : 4,  "C" : 0, "D" : false}
> {"A" : 4, "B" : -4, "C" : 1, "D" : true}



And would use these in physical plan like:

>     {
>       "ref" : "`EXPR$5`",
>       "expr" : "bool_or(`C`) "
>     },
>     {
>       "ref" : "`EXPR$5`",
>       "expr" : "bool_and(`D`) "
>     }


Suggestions?

Peace,
Yash

Re: Query regarding BooleanHolder for - Drill-923

Posted by Yash Sharma <ya...@gmail.com>.
I've tried BitHolder but was getting schema conversion exception while
reading the data, will try again tomorrow.
On Jun 7, 2014 6:18 PM, "Jacques Nadeau" <ja...@apache.org> wrote:

> BitHolder is for boolean values
> On Jun 7, 2014 2:23 AM, "Yash Sharma" <ya...@gmail.com> wrote:
>
> > Hi Drillers,
> > Which holder can be used for representing boolean input data.
> >
> > I have implement bool_and/bool_or (Drill-923) by using the IntHolders for
> > 0/1 input, but could not spot a dedicated BooleanHolder for holding
> > true/false/0/1 values.
> >
> > I want to pass the data in form:
> >
> > {"A" : 7, "B" : 2,  "C" : 1, "D" : true}
> > > {"A" : 4, "B" : -2, "C" : 0, "D" : false}
> > > {"A" : 4, "B" : 4,  "C" : 0, "D" : false}
> > > {"A" : 4, "B" : -4, "C" : 1, "D" : true}
> >
> >
> >
> > And would use these in physical plan like:
> >
> > >     {
> > >       "ref" : "`EXPR$5`",
> > >       "expr" : "bool_or(`C`) "
> > >     },
> > >     {
> > >       "ref" : "`EXPR$5`",
> > >       "expr" : "bool_and(`D`) "
> > >     }
> >
> >
> > Suggestions?
> >
> > Peace,
> > Yash
> >
>

Re: Query regarding BooleanHolder for - Drill-923

Posted by Jacques Nadeau <ja...@apache.org>.
BitHolder is for boolean values
On Jun 7, 2014 2:23 AM, "Yash Sharma" <ya...@gmail.com> wrote:

> Hi Drillers,
> Which holder can be used for representing boolean input data.
>
> I have implement bool_and/bool_or (Drill-923) by using the IntHolders for
> 0/1 input, but could not spot a dedicated BooleanHolder for holding
> true/false/0/1 values.
>
> I want to pass the data in form:
>
> {"A" : 7, "B" : 2,  "C" : 1, "D" : true}
> > {"A" : 4, "B" : -2, "C" : 0, "D" : false}
> > {"A" : 4, "B" : 4,  "C" : 0, "D" : false}
> > {"A" : 4, "B" : -4, "C" : 1, "D" : true}
>
>
>
> And would use these in physical plan like:
>
> >     {
> >       "ref" : "`EXPR$5`",
> >       "expr" : "bool_or(`C`) "
> >     },
> >     {
> >       "ref" : "`EXPR$5`",
> >       "expr" : "bool_and(`D`) "
> >     }
>
>
> Suggestions?
>
> Peace,
> Yash
>