You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "adamreeve (via GitHub)" <gi...@apache.org> on 2024/03/26 04:05:55 UTC
[PR] GH-40792: [C#] Fix slicing a previously sliced array [arrow]
adamreeve opened a new pull request, #40793:
URL: https://github.com/apache/arrow/pull/40793
### Rationale for this change
See #40792, slicing a previously sliced array would return incorrect results.
### What changes are included in this PR?
Removes the duplicated logic accounting for the current offset in `ArrowArrayFactory`, which is already handled by `ArrayData.Slice`.
### Are these changes tested?
Yes, I added a unit test.
### Are there any user-facing changes?
Yes, this is a user-facing bug fix.
--
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.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40792: [C#] Fix slicing a previously sliced array [arrow]
Posted by "conbench-apache-arrow[bot] (via GitHub)" <gi...@apache.org>.
conbench-apache-arrow[bot] commented on PR #40793:
URL: https://github.com/apache/arrow/pull/40793#issuecomment-2021398542
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 4b0f3fd8e40ecfe42e1eb961f50c0fe4affa0f18.
There were no benchmark performance regressions. 🎉
The [full Conbench report](https://github.com/apache/arrow/runs/23123872207) has more details.
--
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.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40792: [C#] Fix slicing a previously sliced array [arrow]
Posted by "adamreeve (via GitHub)" <gi...@apache.org>.
adamreeve commented on code in PR #40793:
URL: https://github.com/apache/arrow/pull/40793#discussion_r1538559867
##########
csharp/src/Apache.Arrow/Arrays/ArrowArrayFactory.cs:
##########
@@ -104,14 +104,6 @@ public static IArrowArray BuildArray(ArrayData data)
public static IArrowArray Slice(IArrowArray array, int offset, int length)
{
- if (offset > array.Length)
Review Comment:
This check and the `length = Math.Min(...` adjustment below are also both accounted for in `ArrayData.Slice`, so I removed them too.
--
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.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] GH-40792: [C#] Fix slicing a previously sliced array [arrow]
Posted by "CurtHagenlocher (via GitHub)" <gi...@apache.org>.
CurtHagenlocher merged PR #40793:
URL: https://github.com/apache/arrow/pull/40793
--
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.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org