westonpace commented on code in PR #14352:
URL: https://github.com/apache/arrow/pull/14352#discussion_r1019659496
##########
cpp/src/arrow/compute/exec.cc:
##########
@@ -118,19 +125,25 @@ std::string ExecBatch::ToString() const {
ExecBatch ExecBatch::Slice(int64_t offset, int64_t length) const {
ExecBatch out = *this;
for (auto& value : out.values) {
- if (value.is_scalar()) continue;
- value = value.array()->Slice(offset, length);
+ if (value.is_scalar()) {
+ // keep value as is
+ } else if (value.is_array()) {
+ value = value.array()->Slice(offset, length);
Review Comment:
I don't think you're missing anything. It's just my inability to read
:laughing: For some reason I thought we implemented slicing by simply reducing
the length. Sorry for the confusion.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]