Apache DataFusion SQL Query Engine
Consolidate configuration sections in docs (#16544)
Andrew Lambe063a8d95841
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex 3e56551711..ecb25483ce 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -707,11 +707,6 @@ jobs:# If you encounter an error, run './dev/update_function_docs.sh' and commit./dev/update_function_docs.shgit diff --exit-code- - name: Check if runtime_configs.md has been modified- run: |- # If you encounter an error, run './dev/update_runtime_config_docs.sh' and commit- ./dev/update_runtime_config_docs.sh- git diff --exit-code# Verify MSRV for the crates which are directly used by other projects:# - datafusiondiff --git a/datafusion/core/src/lib.rs b/datafusion/core/src/lib.rsindex 7a4a1201d6..dbadfc1346 100644--- a/datafusion/core/src/lib.rs+++ b/datafusion/core/src/lib.rs@@ -901,12 +901,6 @@ doc_comment::doctest!(user_guide_configs);-#[cfg(doctest)]-doc_comment::doctest!(- "../../../docs/source/user-guide/runtime_configs.md",- user_guide_runtime_configs-);-#[cfg(doctest)]doc_comment::doctest!("../../../docs/source/user-guide/crate-configuration.md",diff --git a/dev/update_config_docs.sh b/dev/update_config_docs.shindex 585cb77839..10f82ce945 100755--- a/dev/update_config_docs.sh+++ b/dev/update_config_docs.sh@@ -25,6 +25,8 @@ cd "${SOURCE_DIR}/../" && pwdTARGET_FILE="docs/source/user-guide/configs.md"PRINT_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_config_docs"+PRINT_RUNTIME_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_runtime_config_docs"+echo "Inserting header"cat <<'EOF' > "$TARGET_FILE"@@ -70,6 +72,27 @@ EOFecho "Running CLI and inserting config docs table"$PRINT_CONFIG_DOCS_COMMAND >> "$TARGET_FILE"+echo "Inserting runtime config header"+cat <<'EOF' >> "$TARGET_FILE"++# Runtime Configuration Settings++DataFusion runtime configurations can be set via SQL using the `SET` command.++For example, to configure `datafusion.runtime.memory_limit`:++```sql+SET datafusion.runtime.memory_limit = '2G';+```++The following runtime configuration settings are available:++EOF++echo "Running CLI and inserting runtime config docs table"+$PRINT_RUNTIME_CONFIG_DOCS_COMMAND >> "$TARGET_FILE"++echo "Running prettier"npx [email protected] --write "$TARGET_FILE"diff --git a/dev/update_runtime_config_docs.sh b/dev/update_runtime_config_docs.shdeleted file mode 100755index 0d9d0f1033..0000000000--- a/dev/update_runtime_config_docs.sh+++ /dev/null@@ -1,76 +0,0 @@-#!/bin/bash-#-# Licensed to the Apache Software Foundation (ASF) under one-# or more contributor license agreements. See the NOTICE file-# distributed with this work for additional information-# regarding copyright ownership. The ASF licenses this file-# to you under the Apache License, Version 2.0 (the-# "License"); you may not use this file except in compliance-# with the License. You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing,-# software distributed under the License is distributed on an-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY-# KIND, either express or implied. See the License for the-# specific language governing permissions and limitations-# under the License.-#--set -e--SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"-cd "${SOURCE_DIR}/../" && pwd--TARGET_FILE="docs/source/user-guide/runtime_configs.md"-PRINT_CONFIG_DOCS_COMMAND="cargo run --manifest-path datafusion/core/Cargo.toml --bin print_runtime_config_docs"--echo "Inserting header"-cat <<'EOF' > "$TARGET_FILE"-<!---- Licensed to the Apache Software Foundation (ASF) under one- or more contributor license agreements. See the NOTICE file- distributed with this work for additional information- regarding copyright ownership. The ASF licenses this file- to you under the Apache License, Version 2.0 (the- "License"); you may not use this file except in compliance- with the License. You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing,- software distributed under the License is distributed on an- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY- KIND, either express or implied. See the License for the- specific language governing permissions and limitations- under the License.--->--<!----This file was generated by the dev/update_runtime_config_docs.sh script.-Do not edit it manually as changes will be overwritten.-Instead, edit dev/update_runtime_config_docs.sh or the docstrings in datafusion/execution/src/runtime_env.rs.--->--# Runtime Environment Configurations--DataFusion runtime configurations can be set via SQL using the `SET` command.--For example, to configure `datafusion.runtime.memory_limit`:--```sql-SET datafusion.runtime.memory_limit = '2G';-```--The following runtime configuration settings are available:--EOF--echo "Running CLI and inserting runtime config docs table"-$PRINT_CONFIG_DOCS_COMMAND >> "$TARGET_FILE"--echo "Running prettier"-npx [email protected] --write "$TARGET_FILE"--echo "'$TARGET_FILE' successfully updated!"diff --git a/docs/source/conf.py b/docs/source/conf.pyindex 9e24a0aeae..5e31864e9a 100644--- a/docs/source/conf.py+++ b/docs/source/conf.py@@ -125,4 +125,5 @@ suppress_warnings = ['misc.highlighting_failure']redirects = {"library-user-guide/adding-udfs": "functions/index.html",+ "user-guide/runtime_configs": "configs.html",}\ No newline at end of filediff --git a/docs/source/index.rst b/docs/source/index.rstindex 021a426e4c..01f39bcb7c 100644--- a/docs/source/index.rst+++ b/docs/source/index.rst@@ -116,7 +116,6 @@ To get started, seeuser-guide/expressionsuser-guide/sql/indexuser-guide/configs- user-guide/runtime_configsuser-guide/explain-usageuser-guide/faqdiff --git a/docs/source/user-guide/configs.md b/docs/source/user-guide/configs.mdindex ea5ce7ddb0..c618aa18c2 100644--- a/docs/source/user-guide/configs.md+++ b/docs/source/user-guide/configs.md@@ -144,3 +144,19 @@ Environment variables are read during `SessionConfig` initialisation so they mus| datafusion.format.time_format | %H:%M:%S%.f | Time format for time arrays || datafusion.format.duration_format | pretty | Duration format. Can be either `"pretty"` or `"ISO8601"` || datafusion.format.types_info | false | Show types in visual representation batches |++# Runtime Configuration Settings++DataFusion runtime configurations can be set via SQL using the `SET` command.++For example, to configure `datafusion.runtime.memory_limit`:++```sql+SET datafusion.runtime.memory_limit = '2G';+```++The following runtime configuration settings are available:++| key | default | description |+| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |+| datafusion.runtime.memory_limit | NULL | Maximum memory limit for query execution. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes). Example: '2G' for 2 gigabytes. |diff --git a/docs/source/user-guide/runtime_configs.md b/docs/source/user-guide/runtime_configs.mddeleted file mode 100644index feef709db9..0000000000--- a/docs/source/user-guide/runtime_configs.md+++ /dev/null@@ -1,40 +0,0 @@-<!---- Licensed to the Apache Software Foundation (ASF) under one- or more contributor license agreements. See the NOTICE file- distributed with this work for additional information- regarding copyright ownership. The ASF licenses this file- to you under the Apache License, Version 2.0 (the- "License"); you may not use this file except in compliance- with the License. You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing,- software distributed under the License is distributed on an- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY- KIND, either express or implied. See the License for the- specific language governing permissions and limitations- under the License.--->--<!----This file was generated by the dev/update_runtime_config_docs.sh script.-Do not edit it manually as changes will be overwritten.-Instead, edit dev/update_runtime_config_docs.sh or the docstrings in datafusion/execution/src/runtime_env.rs.--->--# Runtime Environment Configurations--DataFusion runtime configurations can be set via SQL using the `SET` command.--For example, to configure `datafusion.runtime.memory_limit`:--```sql-SET datafusion.runtime.memory_limit = '2G';-```--The following runtime configuration settings are available:--| key | default | description |-| ------------------------------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------- |-| datafusion.runtime.memory_limit | NULL | Maximum memory limit for query execution. Supports suffixes K (kilobytes), M (megabytes), and G (gigabytes). Example: '2G' for 2 gigabytes. |