This is an automated email from the ASF dual-hosted git repository.

Jefffrey pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/arrow-rs.git


The following commit(s) were added to refs/heads/main by this push:
     new ff4d74f2f2 chore(deps): bump comfy-table from 7.2.2 to 8.0.0 (#10610)
ff4d74f2f2 is described below

commit ff4d74f2f2c1f524d305a4d329afeffaabed8df4
Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
AuthorDate: Wed Aug 26 22:01:13 2026 +1000

    chore(deps): bump comfy-table from 7.2.2 to 8.0.0 (#10610)
    
    Bumps [comfy-table](https://github.com/nukesor/comfy-table) from 7.2.2
    to 8.0.0.
    <details>
    <summary>Release notes</summary>
    <p><em>Sourced from <a
    href="https://github.com/nukesor/comfy-table/releases";>comfy-table's
    releases</a>.</em></p>
    <blockquote>
    <h2>v8.0.0</h2>
    <h2>[8.0.0] - 05.08.2026</h2>
    <h3>Breaking Changes</h3>
    <ul>
    <li>
    <p>The following types and functions have been removed:</p>
    <ul>
    <li><code>TableComponent</code> enum</li>
    <li>The <code>modifiers</code> module and
    <code>Table::apply_modifier</code> have been removed.</li>
    <li><code>Table::current_style_as_preset</code></li>
    <li><code>Table::set_style</code></li>
    <li><code>Table::style</code></li>
    <li><code>Table::remove_style</code></li>
    <li><code>Table::load_preset</code></li>
    </ul>
    </li>
    <li>
    <p>The positional preset string format has been replaced with the new
    <code>TableStyle</code>, <code>LineStyle</code> and
    <code>ContentLineStyle</code> types.
    The old approach of having &quot;stringified&quot; presets was too
    finicky and also implicitly bound to the order of variants in the old
    <code>TableComponent</code> enum.
    It was just not a good design.</p>
    <p>The new design, in comparison, has a nice and (hopefully) intuitive
    API to define a style.
    On top of that, all functions on <code>TableStyle</code> are
    <code>const</code>, so custom styles can still be declared as
    constants:</p>
    <pre lang="rust"><code>const MY_STYLE: TableStyle = TableStyle::new()
        .top_border(LineStyle::new('┌', '─', '┬', '┐'))
        .header_lines(ContentLineStyle::new('│', '┆', '│'))
        .header_separator(LineStyle::new('╞', '═', '╪', '╡'))
        .content_lines(ContentLineStyle::new('│', '┆', '│'))
        .bottom_border(LineStyle::new('└', '─', '┴', '┘'));
    </code></pre>
    <p>The new API looks as follows:</p>
    <ul>
    <li>Presets in <code>comfy_table::presets::*</code> are now
    <code>TableStyle</code> constants.</li>
    <li><code>Table::load_style(style)</code> has been added to load a
    preset or custom style.</li>
    <li><code>Table::style()</code> and <code>Table::style_mut()</code> to
    get a handle to the style used by the table.
    The <code>mut</code> handle can be used to change the style.</li>
    <li>Instead of modifiers, there are now functions on TableStyle
    
<code>TableStyle::with_rounded_corners</code>/<code>TableStyle::with_solid_inner_borders</code>.</li>
    <li>All fields of <code>TableStyle</code>, <code>LineStyle</code> and
    <code>ContentLineStyle</code> are public:
    <pre lang="rust"><code>table.style_mut().top_border.left = Some('╭');
    </code></pre>
    </li>
    </ul>
    </li>
    <li>
    <p>The default truncation indicator is now <code>…</code> instead of
    <code>...</code>.
    This should make it more obvious that there's more text and consumes
    less visual space.</p>
    </li>
    </ul>
    <h3>Fix</h3>
    <ul>
    <li>
    <p>Various performance improvements that reduce table formatting time
    quite a bit:</p>
    <ul>
    <li>~36% for &quot;normal&quot; tables (The readme of the project).
    <code>17µs -&gt; 11µs</code></li>
    <li>~34% for &quot;larger&quot; tables, which I would consider a
    reasonable usecase. <code>253µs -&gt; 172µs</code></li>
    <li>~70% for <strong>very</strong> large tables, i.e. a 10x500 table.
    -&gt; <code>20.8ms -&gt; 6.15ms</code></li>
    </ul>
    <p>Most of these improvements boil down to:</p>
    </li>
    </ul>
    <!-- raw HTML omitted -->
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Changelog</summary>
    <p><em>Sourced from <a
    
href="https://github.com/Nukesor/comfy-table/blob/main/CHANGELOG.md";>comfy-table's
    changelog</a>.</em></p>
    <blockquote>
    <h2>[8.0.0] - 05.08.2026</h2>
    <h3>Breaking Changes</h3>
    <ul>
    <li>
    <p>The following types and functions have been removed:</p>
    <ul>
    <li><code>TableComponent</code> enum</li>
    <li>The <code>modifiers</code> module and
    <code>Table::apply_modifier</code> have been removed.</li>
    <li><code>Table::current_style_as_preset</code></li>
    <li><code>Table::set_style</code></li>
    <li><code>Table::style</code></li>
    <li><code>Table::remove_style</code></li>
    <li><code>Table::load_preset</code></li>
    </ul>
    </li>
    <li>
    <p>The positional preset string format has been replaced with the new
    <code>TableStyle</code>, <code>LineStyle</code> and
    <code>ContentLineStyle</code> types.
    The old approach of having &quot;stringified&quot; presets was too
    finicky and also implicitly bound to the order of variants in the old
    <code>TableComponent</code> enum.
    It was just not a good design.</p>
    <p>The new design, in comparison, has a nice and (hopefully) intuitive
    API to define a style.
    On top of that, all functions on <code>TableStyle</code> are
    <code>const</code>, so custom styles can still be declared as
    constants:</p>
    <pre lang="rust"><code>const MY_STYLE: TableStyle = TableStyle::new()
        .top_border(LineStyle::new('┌', '─', '┬', '┐'))
        .header_lines(ContentLineStyle::new('│', '┆', '│'))
        .header_separator(LineStyle::new('╞', '═', '╪', '╡'))
        .content_lines(ContentLineStyle::new('│', '┆', '│'))
        .bottom_border(LineStyle::new('└', '─', '┴', '┘'));
    </code></pre>
    <p>The new API looks as follows:</p>
    <ul>
    <li>Presets in <code>comfy_table::presets::*</code> are now
    <code>TableStyle</code> constants.</li>
    <li><code>Table::load_style(style)</code> has been added to load a
    preset or custom style.</li>
    <li><code>Table::style()</code> and <code>Table::style_mut()</code> to
    get a handle to the style used by the table.
    The <code>mut</code> handle can be used to change the style.</li>
    <li>Instead of modifiers, there are now functions on TableStyle
    
<code>TableStyle::with_rounded_corners</code>/<code>TableStyle::with_solid_inner_borders</code>.</li>
    <li>All fields of <code>TableStyle</code>, <code>LineStyle</code> and
    <code>ContentLineStyle</code> are public:
    <pre lang="rust"><code>table.style_mut().top_border.left = Some('╭');
    </code></pre>
    </li>
    </ul>
    </li>
    <li>
    <p>The default truncation indicator is now <code>…</code> instead of
    <code>...</code>.
    This should make it more obvious that there's more text and consumes
    less visual space.</p>
    </li>
    </ul>
    <h3>Fix</h3>
    <ul>
    <li>
    <p>Various performance improvements that reduce table formatting time
    quite a bit:</p>
    <ul>
    <li>~36% for &quot;normal&quot; tables (The readme of the project).
    <code>17µs -&gt; 11µs</code></li>
    <li>~34% for &quot;larger&quot; tables, which I would consider a
    reasonable usecase. <code>253µs -&gt; 172µs</code></li>
    <li>~70% for <strong>very</strong> large tables, i.e. a 10x500 table.
    -&gt; <code>20.8ms -&gt; 6.15ms</code></li>
    </ul>
    <p>Most of these improvements boil down to:</p>
    <ul>
    <li>Less string allocations.</li>
    </ul>
    </li>
    </ul>
    <!-- raw HTML omitted -->
    </blockquote>
    <p>... (truncated)</p>
    </details>
    <details>
    <summary>Commits</summary>
    <ul>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/cf91e018992e1df48aa2008ab8a9d3246d6b1d2c";><code>cf91e01</code></a>
    chore: Release comfy-table version 8.0.0</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/38f044c347197a5278e053b5e9dd5cdaffc02847";><code>38f044c</code></a>
    chore: Prepare release</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/401171a27ff32e1c011775828b8afd418e08927c";><code>401171a</code></a>
    refactor: Replace old presets with TableStyle</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/f4be04ac96ed0499f0f35631396e9d13fb20410c";><code>f4be04a</code></a>
    chore: Fix and extend lints</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/1bdfda2e75f7838ebedfdd5a6787fbc1950faae3";><code>1bdfda2</code></a>
    perf: Don't allocate strings when splitting</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/36bd44f9229828b7cc5c8b6e77584b33ca2a7a10";><code>36bd44f</code></a>
    perf: Track line width in split_line</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/212099cdcca72125f0c5e7f2e8e86e8140d04aad";><code>212099c</code></a>
    perf: Optimize border handling in draw_rows</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/a9680111b91acac30d06bc9dee5ba5aca120d70d";><code>a968011</code></a>
    perf: Cut down string allocations in align_line</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/fea164e9e070c25fa0b1ce770c15a3de8b3dcd21";><code>fea164e</code></a>
    perf: Move formatted lines instead of cloning them</li>
    <li><a
    
href="https://github.com/Nukesor/comfy-table/commit/2935d4e45c1ec2b83415fe516b45c6c86d4490c1";><code>2935d4e</code></a>
    perf: Add printable-ASCII fast path to split_long_word</li>
    <li>Additional commits viewable in <a
    
href="https://github.com/nukesor/comfy-table/compare/v7.2.2...v8.0.0";>compare
    view</a></li>
    </ul>
    </details>
    <br />
    
    ---------
    
    Signed-off-by: dependabot[bot] <[email protected]>
    Co-authored-by: dependabot[bot] 
<49699333+dependabot[bot]@users.noreply.github.com>
    Co-authored-by: Jefffrey <[email protected]>
---
 Cargo.lock               | 4 ++--
 arrow-cast/Cargo.toml    | 2 +-
 arrow-cast/src/pretty.rs | 9 ++++++---
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/Cargo.lock b/Cargo.lock
index 0812500ec0..337405f9d2 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -976,9 +976,9 @@ dependencies = [
 
 [[package]]
 name = "comfy-table"
-version = "7.2.2"
+version = "8.0.0"
 source = "registry+https://github.com/rust-lang/crates.io-index";
-checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47"
+checksum = "136c8c4c3823846e8ba6d4bda011b4e5d5827b8bb0ac26c31f9ab31abe9f54f2"
 dependencies = [
  "unicode-segmentation",
  "unicode-width",
diff --git a/arrow-cast/Cargo.toml b/arrow-cast/Cargo.toml
index 32248f0ac3..fcaf54b481 100644
--- a/arrow-cast/Cargo.toml
+++ b/arrow-cast/Cargo.toml
@@ -51,7 +51,7 @@ half = { version = "2.1", default-features = false }
 num-traits = { version = "0.2.19", default-features = false, features = 
["std"] }
 lexical-core = { version = "1.0", default-features = false, features = 
["write-integers", "write-floats", "parse-integers", "parse-floats"] }
 atoi = "3.1.0"
-comfy-table = { version = "7", optional = true, default-features = false }
+comfy-table = { version = "8", optional = true, default-features = false }
 base64 = "0.23"
 ryu = "1.0.16"
 
diff --git a/arrow-cast/src/pretty.rs b/arrow-cast/src/pretty.rs
index 28a6584dca..ac4258044e 100644
--- a/arrow-cast/src/pretty.rs
+++ b/arrow-cast/src/pretty.rs
@@ -24,11 +24,14 @@
 
 use arrow_array::{Array, ArrayRef, RecordBatch};
 use arrow_schema::{ArrowError, SchemaRef};
-use comfy_table::{Cell, Table};
+use comfy_table::{Cell, LineStyle, Table, TableStyle, 
presets::ASCII_FULL_CONDENSED};
 use std::fmt::Display;
 
 use crate::display::{ArrayFormatter, FormatOptions, make_array_formatter};
 
+const TABLE_STYLE: TableStyle =
+    ASCII_FULL_CONDENSED.header_separator(LineStyle::new('+', '-', '+', '+'));
+
 /// Create a visual representation of [`RecordBatch`]es
 ///
 /// Uses default values for display. See [`pretty_format_batches_with_options`]
@@ -175,7 +178,7 @@ fn create_table(
     options: &FormatOptions,
 ) -> Result<Table, ArrowError> {
     let mut table = Table::new();
-    table.load_preset("||--+-++|    ++++++");
+    table.load_style(TABLE_STYLE);
 
     let schema_opt = schema_opt.or_else(|| {
         if results.is_empty() {
@@ -242,7 +245,7 @@ fn create_column(
     options: &FormatOptions,
 ) -> Result<Table, ArrowError> {
     let mut table = Table::new();
-    table.load_preset("||--+-++|    ++++++");
+    table.load_style(TABLE_STYLE);
 
     if columns.is_empty() {
         return Ok(table);

Reply via email to