feat: Support Show runtime settings#18564
Merged
Weijun-H merged 6 commits intoapache:mainfrom Nov 22, 2025
Merged
Conversation
20ae726 to
b8b552d
Compare
Jefffrey
approved these changes
Nov 17, 2025
9d9799c to
ddb75f3
Compare
ddb75f3 to
ecff92e
Compare
Contributor
|
LGTM, thanks @Weijun-H ! |
Member
Author
logan-keede
pushed a commit
to logan-keede/datafusion
that referenced
this pull request
Nov 23, 2025
## Which issue does this PR close? - Closes apache#18452 ## Rationale for this change Previously, the `SHOW` command could not display runtime configuration settings such as `datafusion.runtime.memory_limit`, `datafusion.runtime.max_temp_directory_size`, etc. When users attempted to view these settings, they would receive an error: Error during planning: 'datafusion.runtime.memory_limit' is not a variable which can be viewed with 'SHOW' This PR enables users to query runtime settings using the `SHOW` command, making them accessible in the same way as other DataFusion configuration variables. ## What changes are included in this PR? 1. **Added `config_entries()` method to `RuntimeEnv`** - Returns runtime configuration as `ConfigEntry` objects with human-readable values (e.g., "100M", "unlimited") 2. **Exposed getter methods in `DiskManager`** - Added `max_temp_directory_size()` and `temp_dir_paths()` to access disk manager configuration 3. **Updated `InformationSchema`** - Modified `make_df_settings()` to include runtime configuration entries from `RuntimeEnv` 4. **Modified SQL statement validation** - Added check for `datafusion.runtime.*` variables to allow SHOW command ## Are these changes tested? Yes, comprehensive tests have been added: - **set_variable.slt** - Tests SHOW and SET for all 4 runtime variables (memory_limit, max_temp_directory_size, metadata_cache_limit, temp_directory) - **information_schema.slt** - Verifies runtime variables appear in `information_schema.df_settings` - Tests cover default values, setting custom values, and querying via information_schema ## Are there any user-facing changes? Yes, users can now: **View runtime settings with SHOW**: ```sql SHOW datafusion.runtime.memory_limit; -- Returns: datafusion.runtime.memory_limit | unlimited
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
Rationale for this change
Previously, the
SHOWcommand could not display runtime configuration settings such asdatafusion.runtime.memory_limit,datafusion.runtime.max_temp_directory_size, etc. When users attempted to view these settings, they would receive an error:Error during planning: 'datafusion.runtime.memory_limit' is not a variable which can be viewed with 'SHOW'
This PR enables users to query runtime settings using the
SHOWcommand, making them accessible in the same way as other DataFusion configuration variables.What changes are included in this PR?
Added
config_entries()method toRuntimeEnv- Returns runtime configuration asConfigEntryobjects with human-readable values (e.g., "100M", "unlimited")Exposed getter methods in
DiskManager- Addedmax_temp_directory_size()andtemp_dir_paths()to access disk manager configurationUpdated
InformationSchema- Modifiedmake_df_settings()to include runtime configuration entries fromRuntimeEnvModified SQL statement validation - Added check for
datafusion.runtime.*variables to allow SHOW commandAre these changes tested?
Yes, comprehensive tests have been added:
information_schema.df_settingsAre there any user-facing changes?
Yes, users can now:
View runtime settings with SHOW: