Re: Converting GraphQL query predicates AST -> Calcite "RelNode" mostly working, but "RelBuilder.or()" incorrectly generating an AND condition

2021-12-27 Thread Gavin Ray
Thanks Julian, your comment: "... and you are passing it a single argument (therefore a trivial OR)." Made me double check what my code was saying there. You were dead on with that, it was as simple as swapping the order. This says "Make an OR statement with 1 condition for every value":

Re: Converting GraphQL query predicates AST -> Calcite "RelNode" mostly working, but "RelBuilder.or()" incorrectly generating an AND condition

2021-12-27 Thread Julian Hyde
I can think of three possibilities: * You are calling the wrong overload of RelBuilder.or and you are passing it a single argument (therefore a trivial OR). * RelBuilder.or does the right thing, but Calcite has a bug in simplifying SEARCH (see https://issues.apache.org/jira/browse/CALCITE-4173

Converting GraphQL query predicates AST -> Calcite "RelNode" mostly working, but "RelBuilder.or()" incorrectly generating an AND condition

2021-12-27 Thread Gavin Ray
Hi all, Sometime earlier I emailed asking about how it might be possible to auto-generate a GraphQL API for Calcite schemas, and to convert GraphQL queries into Calcite queries. Stamatis Zampetakis replied pointing me towards the Pig examples (Thank you! I wasn't subscribed to the list and