drill-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Altekruse <altekruseja...@gmail.com>
Subject Re: UDF - BooleanHolder
Date Wed, 03 Feb 2016 23:39:37 GMT
The correct holder type to use in this case is the BitHolder.

This holder actually stores an integer rather than a boolean value, to set
it true or false you use 1 or 0. This will result in your first example
query working as expected.

There should be documentation in the class about this, I will open a JIRA
for enchaining the docs.

On Wed, Feb 3, 2016 at 3:12 PM, Nicolas Paris <niparisco@gmail.com> wrote:

> Hello,
>
> Hello,
>
> I would like to create a user defined function that would return a boolean
> value.
> Use case would be :
>
> SELECT * FROM x WHERE MyFunction();
>
> I haven't found any BooleanHolder in order to.
>
>   @Output
>     BooleanHolder out;
>
> The only way I have is:
> SELECT * FROM x WHERE MyFunction() =1;
>
> Maybe I miss something
>
> Thanks
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message