You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2020/06/19 10:06:53 UTC

[GitHub] [arrow] tianchen92 opened a new pull request #7496: ARROW-7084: [C++] ArrayRangeEquals should check for full type equality?

tianchen92 opened a new pull request #7496:
URL: https://github.com/apache/arrow/pull/7496


   Related to [ARROW-7084](https://issues.apache.org/jira/browse/ARROW-7084).
   
   It looks like ArrayRangeEquals in compare.cc only checks type IDs before doing comparison actual values.  This is inconsistent with ArrayEquals which checks for type equality and also seems incorrect for cases like Decimal128. 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] tianchen92 commented on a change in pull request #7496: ARROW-7084: [C++] ArrayRangeEquals should check for full type equality?

Posted by GitBox <gi...@apache.org>.
tianchen92 commented on a change in pull request #7496:
URL: https://github.com/apache/arrow/pull/7496#discussion_r443433850



##########
File path: cpp/src/arrow/compare.cc
##########
@@ -984,7 +984,8 @@ bool ArrayRangeEquals(const Array& left, const Array& right, int64_t left_start_
   bool are_equal;
   if (&left == &right) {
     are_equal = true;
-  } else if (left.type_id() != right.type_id()) {
+  } else if (left.type_id() != right.type_id() ||
+             !TypeEquals(*left.type(), *right.type(), false /* check_metadata */)) {

Review comment:
       Thanks wes, fixed.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] github-actions[bot] commented on pull request #7496: ARROW-7084: [C++] ArrayRangeEquals should check for full type equality?

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on pull request #7496:
URL: https://github.com/apache/arrow/pull/7496#issuecomment-646557117


   https://issues.apache.org/jira/browse/ARROW-7084


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] tianchen92 commented on pull request #7496: ARROW-7084: [C++] ArrayRangeEquals should check for full type equality?

Posted by GitBox <gi...@apache.org>.
tianchen92 commented on pull request #7496:
URL: https://github.com/apache/arrow/pull/7496#issuecomment-647402771


   With this change, generate_non_canonical_map_case would fail, i think it is because the map field names. What is the right fix here? @pitrou 


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou commented on pull request #7496: ARROW-7084: [C++] ArrayRangeEquals should check for full type equality?

Posted by GitBox <gi...@apache.org>.
pitrou commented on pull request #7496:
URL: https://github.com/apache/arrow/pull/7496#issuecomment-647422120


   @tianchen92 I'll take a look.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] wesm commented on a change in pull request #7496: ARROW-7084: [C++] ArrayRangeEquals should check for full type equality?

Posted by GitBox <gi...@apache.org>.
wesm commented on a change in pull request #7496:
URL: https://github.com/apache/arrow/pull/7496#discussion_r442906870



##########
File path: cpp/src/arrow/compare.cc
##########
@@ -984,7 +984,8 @@ bool ArrayRangeEquals(const Array& left, const Array& right, int64_t left_start_
   bool are_equal;
   if (&left == &right) {
     are_equal = true;
-  } else if (left.type_id() != right.type_id()) {
+  } else if (left.type_id() != right.type_id() ||
+             !TypeEquals(*left.type(), *right.type(), false /* check_metadata */)) {

Review comment:
       Can you add a couple of tests with some parametric types (e.g. TIMESTAMP with different time units)?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [arrow] pitrou closed pull request #7496: ARROW-7084: [C++] Check for full type equality in ArrayRangeEquals

Posted by GitBox <gi...@apache.org>.
pitrou closed pull request #7496:
URL: https://github.com/apache/arrow/pull/7496


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org