rtpsw commented on code in PR #14352:
URL: https://github.com/apache/arrow/pull/14352#discussion_r1019634304
##########
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 may be missing something. This `Slice` invocation also appears in the
pre-PR code, plus the code here is within `ExecBatch::Slice`, so I would expect
the `Slice` invocation to be acceptable here.
--
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]