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/10/08 20:47:18 UTC

[GitHub] [arrow] eerhardt opened a new pull request #8404: ARROW-10238: [C#] List is broken

eerhardt opened a new pull request #8404:
URL: https://github.com/apache/arrow/pull/8404


   When reading the flatbuffer type information, we are reading the ListType incorrectly. We should be using the childFields parameter, like we do for StructTypes.
   
   I also took this opportunity to redo how we compare schema information in our tests. For nested types, we need to recursively compare types all the way down.
   
   @pgovind @HashidaTKS @chutchinson 


----------------------------------------------------------------
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] pgovind commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Ah ok. Sad that we need to have 2 copies for this. But, it's in testing code, so I'm not that concerned about it.




----------------------------------------------------------------
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] pgovind commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Is this method similar to `Equals` above?




----------------------------------------------------------------
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 #8404: ARROW-10238: [C#] List is broken

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


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


----------------------------------------------------------------
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] eerhardt commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       They have the same logic, but different purposes.
   
   This one Asserts that the 2 Fields are equal, by going through each property and `Assert.Equal`. When something is not equal, this is a better option because xunit will tell you exactly what and why doesn't equal. The above `Equals` method only returns true or false if the 2 Fields equal. I needed to leave the `Equals` method in because there are a few places that `Assert.False(FieldComparer.Equals(f1, f2))`. Those couldn't be migrated to the `Compare` method because we expect the two instances to be different - so the Asserts would throw.




----------------------------------------------------------------
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] pgovind commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Isn't this method similar to `Equals` above? `Compare` could just call through to `Equals` and assert if the return was false? 




----------------------------------------------------------------
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] eerhardt commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       They have the same logic, but different purposes.
   
   This one Asserts that the 2 Fields are equal, by going through each property and `Assert.Equal`. When something is not equal, this is a better option because xunit will tell you exactly what and why doesn't equal. The above `Equals` method only returns true or false if the 2 Fields equal. I needed to leave the `Equals` method in because there are a few places that `Assert.False(FieldComparer.Equals(f1, f2))`. Those couldn't be migrated to the `Compare` method because we expect the two instances to be different - so the Asserts would throw.




----------------------------------------------------------------
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] pgovind commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Does this method do the same thing that `Equals` does above?

##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Is this method similar to `Equals` above?

##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Isn't this method similar to `Equals` above? `Compare` could just call through to `Equals` and assert if the return was false? 

##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Ah ok. Sad that we need to have 2 copies for this. But, it's in testing code, so I'm not that concerned about it.




----------------------------------------------------------------
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 #8404: ARROW-10238: [C#] List is broken

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


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


----------------------------------------------------------------
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] eerhardt closed pull request #8404: ARROW-10238: [C#] List is broken

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


   


----------------------------------------------------------------
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] eerhardt closed pull request #8404: ARROW-10238: [C#] List is broken

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


   


----------------------------------------------------------------
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] pgovind commented on a change in pull request #8404: ARROW-10238: [C#] List is broken

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



##########
File path: csharp/test/Apache.Arrow.Tests/FieldComparer.cs
##########
@@ -38,5 +39,26 @@ public static bool Equals(Field f1, Field f2)
             }
             return false;
         }
+
+        public static void Compare(Field expected, Field actual)

Review comment:
       Does this method do the same thing that `Equals` does above?




----------------------------------------------------------------
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