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 2021/07/26 18:10:20 UTC

[GitHub] [arrow] bkietz commented on a change in pull request #10713: ARROW-12837: [C++] Do not crash when printing invalid arrays

bkietz commented on a change in pull request #10713:
URL: https://github.com/apache/arrow/pull/10713#discussion_r676738066



##########
File path: cpp/src/arrow/pretty_print.cc
##########
@@ -325,6 +325,12 @@ class ArrayPrinter : public PrettyPrinter {
                   std::is_base_of<FixedSizeListArray, T>::value,
               Status>
   Visit(const T& array) {
+    Status validArrayState = array.Validate();
+    if (!validArrayState.ok()) {
+      (*sink_) << "<InvalidArray: " << validArrayState.message() << ">";

Review comment:
       ```suggestion
       Status st = array.Validate();
       if (!st.ok()) {
         (*sink_) << "<InvalidArray: " << st.message() << ">";
   ```




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