Skip to content

feat: use macro to expose ballista config options - #2387

Open
milenkovicm wants to merge 7 commits into
apache:mainfrom
milenkovicm:feat_config_simplification
Open

feat: use macro to expose ballista config options #2387
milenkovicm wants to merge 7 commits into
apache:mainfrom
milenkovicm:feat_config_simplification

Conversation

@milenkovicm

Copy link
Copy Markdown
Contributor

Which issue does this PR close?

Closes #.

Rationale for this change

We had quite a lot of boiler plate code to expose ballista config option, also exposed names might differ.
Also we did not have uniform naming strategy for exposed configuration properties

What changes are included in this PR?

  • macro which generates ballista config getters and setters
  • change to some method names
  • deprecations to methods not following naming strategy

Are there any user-facing changes?

Yes, some config names have changed

@milenkovicm
milenkovicm marked this pull request as ready for review August 27, 2026 09:29
@milenkovicm milenkovicm changed the title feat: use macro to declare ballista config options feat: use macro to expose ballista config options Aug 27, 2026
@milenkovicm
milenkovicm marked this pull request as draft August 27, 2026 09:32
@milenkovicm
milenkovicm marked this pull request as ready for review August 27, 2026 10:09
}

/// Deprecated alias for [`Self::standalone_parallelism`].
#[deprecated(note = "renamed to `standalone_parallelism`")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[deprecated(note = "renamed to `standalone_parallelism`")]
#[deprecated(since = "55.0.0", note = "renamed to `standalone_parallelism`")]

this makes it easier to decide when it is time to remove the deprecated method.

}

/// Deprecated alias for [`Self::use_tls`].
#[deprecated(note = "renamed to `use_tls`")]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#[deprecated(note = "renamed to `use_tls`")]
#[deprecated(since = "55.0.0", note = "renamed to `use_tls`")]

Comment thread Cargo.toml Outdated
Comment on lines +1095 to +1096
let plain = SessionConfig::new_with_ballista()
.with_ballista_standalone_parallelism(123)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let plain = SessionConfig::new_with_ballista()
.with_ballista_standalone_parallelism(123)
let plain = SessionConfig::new_with_ballista()
.with_ballista_adaptive_query_planner(true)
.with_ballista_standalone_parallelism(123)

.with_ballista_coalesce_small_partition_factor(1.5)
.with_ballista_coalesce_merged_partition_factor(2.5);

assert!(plain.ballista_shuffle_reader_force_remote_read());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
assert!(plain.ballista_shuffle_reader_force_remote_read());
assert!(plain.ballista_adaptive_query_planner_enabled());
assert!(plain.ballista_shuffle_reader_force_remote_read());

assert_eq!(
plain.ballista_shuffle_reader_maximum_concurrent_requests(),
7
);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the deprecated getters be tested too ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this one is not deprecated,

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants