Skip to content

fix: avoid panic parsing non-ASCII runtime config values#23316

Open
ByteBaker wants to merge 1 commit into
apache:mainfrom
ByteBaker:fix/set-df-runtime-non-ascii-panic
Open

fix: avoid panic parsing non-ASCII runtime config values#23316
ByteBaker wants to merge 1 commit into
apache:mainfrom
ByteBaker:fix/set-df-runtime-non-ascii-panic

Conversation

@ByteBaker

Copy link
Copy Markdown

Which issue does this PR close?

Rationale for this change

Presence of a non-ascii character in the value while setting any datafusion runtime variable was panicking.

What changes are included in this PR?

Better handling/iteration on character-boundary, and emits plan error now instead of panicking in case of such characters.

Are these changes tested?

Yes. UTs have been updated to include such cases.

Are there any user-facing changes?

No.

@github-actions github-actions Bot added the core Core DataFusion crate label Jul 3, 2026
@ByteBaker

Copy link
Copy Markdown
Author

Hi @alamb for your review please.

@comphead comphead left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks @ByteBaker can we please explore if runtime config can be part of SessionConfig? In SessionConfig there is already a framework that enforces type checking.

Edit: runtime configs looks looks finite according to set_runtime_variable, so should fit into main configs rather than having separate config set

@ByteBaker

Copy link
Copy Markdown
Author

@comphead yes that'd be a lot more cleaner/robust. However, that would also be a significant change in user-facing ergonomics.

My suggestion would be to keep this PR to ensure the panic is resolved, and separately start a discussion around doing that, since that's a larger change surface (and the question if we should remove all the runtime variables from the SET xyz semantics)

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

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

panic on SET datafusion.runtime.* when value ends with non-ASCII byte (split_at char boundary)

2 participants