lidavidm commented on code in PR #37168:
URL: https://github.com/apache/arrow/pull/37168#discussion_r1297197438
##########
cpp/src/arrow/pretty_print.cc:
##########
@@ -145,7 +145,8 @@ class ArrayPrinter : public PrettyPrinter {
int window = is_container ? options_.container_window : options_.window;
for (int64_t i = 0; i < array.length(); ++i) {
const bool is_last = (i == array.length() - 1);
- if ((i >= window) && (i < (array.length() - window))) {
Review Comment:
I don't think so, because if you have (say) 6 elements with a window of 2,
then you'd render 5 of the elements when you only mean to render 4, right?
##########
cpp/src/arrow/pretty_print.cc:
##########
@@ -145,7 +145,8 @@ class ArrayPrinter : public PrettyPrinter {
int window = is_container ? options_.container_window : options_.window;
for (int64_t i = 0; i < array.length(); ++i) {
const bool is_last = (i == array.length() - 1);
- if ((i >= window) && (i < (array.length() - window))) {
Review Comment:
That said, we should comment this check to be clear about what it's achieving
--
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]