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/04/22 01:11:34 UTC

[GitHub] [arrow] markhildreth opened a new pull request #7006: ARROW-8508 [Rust] FixedSizeListArray improper offset for value

markhildreth opened a new pull request #7006:
URL: https://github.com/apache/arrow/pull/7006


   Potentially Fixes ARROW-8508
   
   Fixed size list arrays sourced with a non-zero offset of their
   child data was respecting this offset when calculating value offsets
   in the `value_offset` method, but not in the `value` method. This would
   cause nested fixed list arrays that should have looked like this:
   
   ```
   [
     [ [0, 1] ],
     [ [2, 3], [4, 5] ]
   ]
   ```
   
   ...to behave like this when looking directly at the values...
   
   ```
   [
     [ [0, 1] ],
     [ [0, 1], [2, 3] ],
   ]
   ```
   
   This is different to how ListArray would do things (which respect the offset in both methods). This PR makes the change. Additionally, it adds a failing test case for this, as well as a passing test case for similar cases, including on ListArray.


----------------------------------------------------------------
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] markhildreth commented on a change in pull request #7006: ARROW-8508: [Rust] FixedSizeListArray improper offset for value

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



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -2592,6 +2619,15 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(3, list_array.len());
         assert_eq!(0, list_array.null_count());
+        assert_eq!(

Review comment:
       The rest of the tests were passing previously. This was the failing test. The actual value returned was 0.




----------------------------------------------------------------
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] markhildreth commented on a change in pull request #7006: ARROW-8508: [Rust] FixedSizeListArray improper offset for value

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



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -2592,6 +2619,15 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(3, list_array.len());
         assert_eq!(0, list_array.null_count());
+        assert_eq!(

Review comment:
       The rest of the added tests would have been passing previously. This would be the failing test. The actual value that was being returned was 0.




----------------------------------------------------------------
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 issue #7006: ARROW-8508 [Rust] FixedSizeListArray improper offset for value

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


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


----------------------------------------------------------------
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] markhildreth commented on a change in pull request #7006: ARROW-8508: [Rust] FixedSizeListArray improper offset for value

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



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -2592,6 +2619,15 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(3, list_array.len());
         assert_eq!(0, list_array.null_count());
+        assert_eq!(

Review comment:
       The rest of the added tests were passing previously. This was the failing test. The actual value returned was 0.




----------------------------------------------------------------
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] markhildreth commented on a change in pull request #7006: ARROW-8508: [Rust] FixedSizeListArray improper offset for value

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



##########
File path: rust/arrow/src/array/array.rs
##########
@@ -2592,6 +2619,15 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(3, list_array.len());
         assert_eq!(0, list_array.null_count());
+        assert_eq!(

Review comment:
       The rest of the added tests would have been passing previously. This would be the failing test. The actual value that was being returned was 0.

##########
File path: rust/arrow/src/array/array.rs
##########
@@ -2592,6 +2619,15 @@ mod tests {
         assert_eq!(DataType::Int32, list_array.value_type());
         assert_eq!(3, list_array.len());
         assert_eq!(0, list_array.null_count());
+        assert_eq!(
+            3,
+            list_array
+                .value(0)
+                .as_any()
+                .downcast_ref::<Int32Array>()
+                .unwrap()
+                .value(0)
+        );

Review comment:
       The rest of the added tests would have been passing previously. This would be the failing test. The actual value that was being returned was 0.




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