Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-7264

[Java] RangeEqualsVisitor type check is not correct

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      Currently RangeEqualsVisitor generally only checks type once and keep the result to avoid repeated type checking, see

      typeCompareResult = left.getField().getType().equals(right.getField().getType());
      

      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.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            tianchen92 Ji Liu
            tianchen92 Ji Liu
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 1h 50m
                1h 50m

                Slack

                  Issue deployment