fix: avoid panic parsing non-ASCII runtime config values#23316
fix: avoid panic parsing non-ASCII runtime config values#23316ByteBaker wants to merge 1 commit into
Conversation
|
Hi @alamb for your review please. |
There was a problem hiding this comment.
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
|
@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 |
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.