[ 
https://issues.apache.org/jira/browse/CALCITE-6636?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17891055#comment-17891055
 ] 

Julian Hyde commented on CALCITE-6636:
--------------------------------------

Sounds like Arrow wants CNF (a list of conjunctions - expressions AND-ed 
together). We have ways to convert disjunctive expressions into conjunctive 
expressions.

{{(intField > 1 and stringField = '2') or intField = 0}}

becomes

{{(intField > 1 or intField = 0) and (stringField = '2' or intField = 0)}}

 

> Refactor the Filter operator of Arrow ArrowAdapter
> --------------------------------------------------
>
>                 Key: CALCITE-6636
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6636
>             Project: Calcite
>          Issue Type: Improvement
>          Components: arrow-adapter
>    Affects Versions: 1.38.0
>            Reporter: Caican Cai
>            Assignee: Caican Cai
>            Priority: Major
>             Fix For: 1.39.0
>
>
> Recently, I tried to complete 
> https://issues.apache.org/jira/browse/CALCITE-6293
> I found a problem. When building the Filter operator structure, we did not 
> effectively fill the List<TreeNode> conditionNodes according to operators 
> such as and and or, so our current Filter operator structure can only support 
> the and operator
> Currently, I have a way to support simple or operators, but I cannot support 
> complex nested and+or and other operator joint queries, such as
> {code:java}
> String sql = "select \"intField\", \"stringField\"\n"
> + "from arrowdata\n"
> + "where (\"intField\" > 1 and \"stringField\" = '2') or \"intField\" = 0";
> {code}
> I plan to add operator information to List<TreeNode> conditionNodes so that 
> we can finally assemble a suitable Filter structure



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to