You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "alamb (via GitHub)" <gi...@apache.org> on 2023/02/14 15:28:31 UTC

[GitHub] [arrow-rs] alamb commented on a diff in pull request #3717: Add pretty format with options

alamb commented on code in PR #3717:
URL: https://github.com/apache/arrow-rs/pull/3717#discussion_r1105981130


##########
arrow/src/util/pretty.rs:
##########
@@ -19,41 +19,58 @@
 //! available unless `feature = "prettyprint"` is enabled.
 
 use crate::{array::ArrayRef, record_batch::RecordBatch};
+use arrow_array::Array;
 use arrow_cast::display::{ArrayFormatter, FormatOptions};
 use comfy_table::{Cell, Table};
 use std::fmt::Display;
 
 use crate::error::Result;
 
-use super::display::array_value_to_string;
-
-///! Create a visual representation of record batches
+/// Create a visual representation of record batches
 pub fn pretty_format_batches(results: &[RecordBatch]) -> Result<impl Display> {
-    create_table(results)
+    let options = FormatOptions::default().with_display_error(true);
+    pretty_format_batches_with_options(results, &options)
 }
 
-///! Create a visual representation of columns
+/// Create a visual representation of record batches

Review Comment:
   ❤️ 



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