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

Alessandro Solimando commented on CALCITE-6293:
-----------------------------------------------

[~hongyuguo] is revamping the [PR|https://github.com/apache/calcite/pull/3666] 
for the arrow adapter (CALCITE-2040) and I am helping reviewing it (we don't 
work for the same organization AFAIK).

In the ticket there seems to be consensus to get the adapter merged even if 
some functionalities are not there yet (decision with which I agree, 
considering the size of the PR and that it's gone stale two times already).

During the review process I suggested to file a ticket for each broken test we 
write and for any important missing functionality (e.g., supporting more data 
types).

At the moment, the code throws for disjunctive filters:
{code:java}
java.lang.AssertionError: cannot translate OR(=($0, 12), =($1, '12'))
    at 
org.apache.calcite.adapter.arrow.ArrowTranslator.translateMatch(ArrowTranslator.java:69)
    at org.apache.calcite.adapter.arrow.ArrowFilter.<init>(ArrowFilter.java:47)
    at 
org.apache.calcite.adapter.arrow.ArrowRules$ArrowFilterRule.convert(ArrowRules.java:99)
    at 
org.apache.calcite.adapter.arrow.ArrowRules$ArrowFilterRule.onMatch(ArrowRules.java:89)
    at 
org.apache.calcite.plan.volcano.VolcanoRuleCall.onMatch(VolcanoRuleCall.java:223)
 {code}
What you suggest would work if the logical filters weren't translated to 
ArrowFilter by the ArrowFilterRule if a disjunction is detected in the filter's 
condition, which can be easily implemented in a second step.

I agree that at least the stacktrace of the current error, or discrepancy 
w.r.t. the expected result, should be provided in the ticket description.

[~hongyuguo], could you please improve accordingly the tickets you have filed 
already?

> Support OR condition in arrow adapter
> -------------------------------------
>
>                 Key: CALCITE-6293
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6293
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: hongyu guo
>            Priority: Major
>
> for example
> {code:java}
> String sql = "select \"intField\", \"stringField\"\n"
>     + "from arrowdata\n"
>     + "where \"intField\"=12 or \"stringField\"='12'"; {code}



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

Reply via email to