You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by CPC <ac...@gmail.com> on 2016/09/07 21:44:49 UTC
RexCall Logic
Hi,
Is there any utility/helper class in calcite to detect and simplify such a
rexcall
AND(=($0, 1), =($0, 2))
to false.
Thanks...
Re: RexCall Logic
Posted by Jesus Camacho Rodriguez <jc...@hortonworks.com>.
It should indeed cover that case.
--
Jesús
On 9/7/16, 11:02 PM, "Julian Hyde" <jh...@apache.org> wrote:
>Jesus added something very close to that in
>https://issues.apache.org/jira/browse/CALCITE-1220:
>
> // condition not satisfiable
> checkSimplifyFilter(and(eq(aRef, literal1), eq(bRef, literal10),
>eq(aRef, bRef)),
> "false");
>
>You could add a new case in RexProgramTest and see whether it doe what you need.
>
>On Wed, Sep 7, 2016 at 2:44 PM, CPC <ac...@gmail.com> wrote:
>> Hi,
>>
>> Is there any utility/helper class in calcite to detect and simplify such a
>> rexcall
>>
>> AND(=($0, 1), =($0, 2))
>>
>> to false.
>>
>> Thanks...
>
Re: RexCall Logic
Posted by Julian Hyde <jh...@apache.org>.
Jesus added something very close to that in
https://issues.apache.org/jira/browse/CALCITE-1220:
// condition not satisfiable
checkSimplifyFilter(and(eq(aRef, literal1), eq(bRef, literal10),
eq(aRef, bRef)),
"false");
You could add a new case in RexProgramTest and see whether it doe what you need.
On Wed, Sep 7, 2016 at 2:44 PM, CPC <ac...@gmail.com> wrote:
> Hi,
>
> Is there any utility/helper class in calcite to detect and simplify such a
> rexcall
>
> AND(=($0, 1), =($0, 2))
>
> to false.
>
> Thanks...