You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@arrow.apache.org by "Ji Liu (Jira)" <ji...@apache.org> on 2019/11/26 09:58:00 UTC

[jira] [Created] (ARROW-7264) [Java] RangeEqualsVisitor type check is not correct

Ji Liu created ARROW-7264:
-----------------------------

             Summary: [Java] RangeEqualsVisitor type check is not correct
                 Key: ARROW-7264
                 URL: https://issues.apache.org/jira/browse/ARROW-7264
             Project: Apache Arrow
          Issue Type: Bug
          Components: Java
    Affects Versions: 0.15.1
            Reporter: Ji Liu
            Assignee: Ji Liu


Currently {{RangeEqualsVisitor}} generally only checks type once and keep the result to avoid repeated type checking, see
{code:java}
typeCompareResult = left.getField().getType().equals(right.getField().getType());
{code}
This only compares {{ArrowType}} and for complex type, this may cause unexpected behavior, for example {{List<Int>}} and {{List<BigInt>}} would be type equals which not consider their child field.

We should compare Field here instead and to make it more extendable, we use {{TypeEqualsVisitor}} to compare Field, in this way, one could choose whether checks names or metadata either.

 

Also provide a test for ListVector to validate this change.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)