Skip to content

[C++] Add support for specifying custom Array opening and closing delimiters to arrow::PrettyPrintDelimiters #37979

@kevingurney

Description

@kevingurney

Describe the enhancement requested

As a follow up to #37981, in order to make the arrow::PrettyPrint functionality for arrow::Array more flexible, it would be useful to be to specify a custom Array opening and closing delimiter other than "[" and "]".

For example, the MATLAB interface wraps the Arrow C++ libraries and being able to specify a custom opening and closing delimiter for Array would make it possible to make the display of MATLAB arrow.array.Array objects more MATLAB-like.

In order to support custom Array opening and closing delimiters, we could add two new properties, open and close, to the arrow::PrettyPrintDelimiters struct.

Implementing this functionality would enable use cases like the ability to display an arrow::Array that normally displays as [1,2,3] to display as <1,2,3> by setting options.array_delimiters.open = "<" and options.array_delimiters.close = ">".

Component(s)

C++

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions