Skip to content

Use FormatOptions in Const Contexts #4580

@tustvold

Description

@tustvold

Is your feature request related to a problem or challenge? Please describe what you are trying to do.

I would like to be able to specify a default set of FormatOptions for use by datafusion-cli and its tests, it would be advantageous if this could be declared as a const.

Describe the solution you'd like

I would like to be able to write

const DEFAULT_FORMAT_OPTIONS: FormatOptions<'static> = FormatOptions::new()
        .with_date_format(Some("foo"))
        .with_timestamp_format(Some("404"));

By extension this will also allow declaring const CastOptions

Describe alternatives you've considered

Additional context

Metadata

Metadata

Assignees

Labels

arrowChanges to the arrow crateenhancementAny new improvement worthy of a entry in the changelog

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions