You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@parquet.apache.org by Gil Vernik <GI...@il.ibm.com> on 2015/09/05 19:04:03 UTC

create FilterPredicate from string

Hello,

Is there any easy way to create FilterPredicate from String?  For example, 
I have a string 
?and(or(eq(ic, 7), eq(ic, 17)), eq(bc, Binary{?aaa"}))? and I want to 
create FilterPredicate form it.

Of course I can parse it into expression tree and then create 
FilterPredicate, but I wonder if there is an easier solution or may be it 
already exists.

Thanks,
Gil.

Re: create FilterPredicate from string

Posted by Ryan Blue <bl...@cloudera.com>.
I don't know of anything that already does this for Parquet. There's 
something similar in Kite [1] that you can take a look at that 
translates to and from URI query parameters.

rb

[1]: 
https://github.com/kite-sdk/kite/blob/master/kite-data/kite-data-core/src/main/java/org/kitesdk/data/spi/predicates/Predicates.java#L52

On 09/05/2015 10:04 AM, Gil Vernik wrote:
> Hello,
>
> Is there any easy way to create FilterPredicate from String?  For example,
> I have a string
> ?and(or(eq(ic, 7), eq(ic, 17)), eq(bc, Binary{?aaa"}))? and I want to
> create FilterPredicate form it.
>
> Of course I can parse it into expression tree and then create
> FilterPredicate, but I wonder if there is an easier solution or may be it
> already exists.
>
> Thanks,
> Gil.
>


-- 
Ryan Blue
Software Engineer
Cloudera, Inc.