Skip to content

Better api for setting ConfigOptions from SessionContext#3908

Description

@alamb

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

I want to set configuration options given a session context. Right now I need to do it like 馃ぎ

        let session_ctx = SessionContext::new();

        {
            // lock scope
            let state = session_ctx.state.write();
            let mut config_options = state.config.config_options.write();
            config_options.set_bool(OPT_PARQUET_PUSHDOWN_FILTERS, true);
            config_options.set_bool(OPT_PARQUET_REORDER_FILTERS, true);
        }

Describe the solution you'd like

I would like an API like this:

        let session_ctx = SessionContext::new()
          .with_bool(OPT_PARQUET_PUSHDOWN_FILTERS, true)
          .with_bool(OPT_PARQUET_REORDER_FILTERS, true);

As well as

        let session_ctx = SessionContext::new();
        session_ctx.set_bool(OPT_PARQUET_PUSHDOWN_FILTERS, true);
        session_ctx.set_bool(OPT_PARQUET_REORDER_FILTERS, true);

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions