Support '0' value for parse_capacity_limit()#22014
Support '0' value for parse_capacity_limit()#22014mkleen wants to merge 1 commit intoapache:mainfrom
Conversation
| "Empty limit value found for '{config_name}'" | ||
| )); | ||
| } | ||
| if limit == "0" { |
There was a problem hiding this comment.
Nice addition to cover the helper directly 👍
Since the intended user-facing flow is SET datafusion.runtime.* = '0', it could also be helpful to add a small SQL-level regression test or SLT that exercises something like SET datafusion.runtime.memory_limit = '0' and verifies SHOW returns the expected value.
That would help catch any future wiring regressions between the parser and the config layer.
|
Since this PR adds bare |
|
@kosiew Thanks for the review, i will do a follow-up here soon. |
Which issue does this PR close?
Rationale for this change
This extends
parse_capacity_limit()to support `0` to set a limit of 0 instead of using `0K`.This simplifies configuration and avoids confusion with the word `OK` (Okay).
This is based on the suggestion from @martin-g.
Usage:
instead of:
What changes are included in this PR?
see above.
Are these changes tested?
Yes.
Are there any user-facing changes?
Yes.