This is an automated email from the ASF dual-hosted git repository. github-bot pushed a commit to branch asf-site in repository https://gitbox.apache.org/repos/asf/datafusion.git
The following commit(s) were added to refs/heads/asf-site by this push: new 29393433c5 Publish built docs triggered by 4c36226bc4a4a82c42a24a07c2ba068891f981e4 29393433c5 is described below commit 29393433c53d3f3caa359de2ac02df52b589ac3c Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> AuthorDate: Tue Aug 5 11:16:11 2025 +0000 Publish built docs triggered by 4c36226bc4a4a82c42a24a07c2ba068891f981e4 --- _sources/user-guide/configs.md.txt | 46 +++++++++++++++++++++------ searchindex.js | 2 +- user-guide/configs.html | 65 ++++++++++++++++++++++++++++++++------ 3 files changed, 94 insertions(+), 19 deletions(-) diff --git a/_sources/user-guide/configs.md.txt b/_sources/user-guide/configs.md.txt index 7c760e7de4..c817daad2c 100644 --- a/_sources/user-guide/configs.md.txt +++ b/_sources/user-guide/configs.md.txt @@ -18,22 +18,50 @@ --> <!--- -This file was generated by the dev/update_config_docs.sh script. +NOTE: This file was generated by the dev/update_config_docs.sh script. Do not edit it manually as changes will be overwritten. Instead, edit dev/update_config_docs.sh or the docstrings in datafusion/core/src/config.rs. --> # Configuration Settings -The following configuration options can be passed to `SessionConfig` to control various aspects of query execution. +DataFusion configurations control various aspects of DataFusion planning and execution -For applications which do not expose `SessionConfig`, like `datafusion-cli`, these options may also be set via environment variables. -To construct a session with options from the environment, use `SessionConfig::from_env`. -The name of the environment variable is the option's key, transformed to uppercase and with periods replaced with underscores. -For example, to configure `datafusion.execution.batch_size` you would set the `DATAFUSION_EXECUTION_BATCH_SIZE` environment variable. -Values are parsed according to the [same rules used in casts from Utf8](https://docs.rs/arrow/latest/arrow/compute/kernels/cast/fn.cast.html). -If the value in the environment variable cannot be cast to the type of the configuration option, the default value will be used instead and a warning emitted. -Environment variables are read during `SessionConfig` initialisation so they must be set beforehand and will not affect running sessions. +## Setting Configuration Options + +### Programmatically + +You can set the options programmatically via the [`ConfigOptions`] object. For +example, to configure the `datafusion.execution.target_partitions` using the API: + +```rust +use datafusion::common::config::ConfigOptions; +let mut config = ConfigOptions::new(); +config.execution.target_partitions = 1; +``` + +### Via Environment Variables + +You can also set configuration options via environment variables using +[`ConfigOptions::from_env`], for example + +```shell +DATAFUSION_EXECUTION_TARGET_PARTITIONS=1 ./your_program +``` + +### Via SQL + +You can also set configuration options via SQL using the `SET` command. For +example, to configure `datafusion.execution.target_partitions`: + +```sql +SET datafusion.execution.target_partitions = '1'; +``` + +[`configoptions`]: https://docs.rs/datafusion/latest/datafusion/common/config/struct.ConfigOptions.html +[`configoptions::from_env`]: https://docs.rs/datafusion/latest/datafusion/common/config/struct.ConfigOptions.html#method.from_env + +The following configuration settings are available: | key | default | description [...] | ----------------------------------------------------------------------- | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- [...] diff --git a/searchindex.js b/searchindex.js index 6eb90e72ac..5a3649bdf8 100644 --- a/searchindex.js +++ b/searchindex.js @@ -1 +1 @@ -Search.setIndex({"alltitles":{"!=":[[56,"op-neq"]],"!~":[[56,"op-re-not-match"]],"!~*":[[56,"op-re-not-match-i"]],"!~~":[[56,"id19"]],"!~~*":[[56,"id20"]],"#":[[56,"op-bit-xor"]],"%":[[56,"op-modulo"]],"&":[[56,"op-bit-and"]],"(relation, name) tuples in logical fields and logical columns are unique":[[12,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[56,"op-multiply"]],"+":[[56,"op-plus"]],"-":[[56,"op-minus"]],"/":[[56,"op-divide"]],"<":[[56,"op-lt"]],"< [...] \ No newline at end of file +Search.setIndex({"alltitles":{"!=":[[56,"op-neq"]],"!~":[[56,"op-re-not-match"]],"!~*":[[56,"op-re-not-match-i"]],"!~~":[[56,"id19"]],"!~~*":[[56,"id20"]],"#":[[56,"op-bit-xor"]],"%":[[56,"op-modulo"]],"&":[[56,"op-bit-and"]],"(relation, name) tuples in logical fields and logical columns are unique":[[12,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[56,"op-multiply"]],"+":[[56,"op-plus"]],"-":[[56,"op-minus"]],"/":[[56,"op-divide"]],"<":[[56,"op-lt"]],"< [...] \ No newline at end of file diff --git a/user-guide/configs.html b/user-guide/configs.html index 9bcacbcd1c..76e2adae5a 100644 --- a/user-guide/configs.html +++ b/user-guide/configs.html @@ -548,6 +548,30 @@ <a class="reference internal nav-link" href="#"> Configuration Settings </a> + <ul class="visible nav section-nav flex-column"> + <li class="toc-h2 nav-item toc-entry"> + <a class="reference internal nav-link" href="#setting-configuration-options"> + Setting Configuration Options + </a> + <ul class="nav section-nav flex-column"> + <li class="toc-h3 nav-item toc-entry"> + <a class="reference internal nav-link" href="#programmatically"> + Programmatically + </a> + </li> + <li class="toc-h3 nav-item toc-entry"> + <a class="reference internal nav-link" href="#via-environment-variables"> + Via Environment Variables + </a> + </li> + <li class="toc-h3 nav-item toc-entry"> + <a class="reference internal nav-link" href="#via-sql"> + Via SQL + </a> + </li> + </ul> + </li> + </ul> </li> <li class="toc-h1 nav-item toc-entry"> <a class="reference internal nav-link" href="#runtime-configuration-settings"> @@ -601,20 +625,41 @@ under the License. --> <!--- -This file was generated by the dev/update_config_docs.sh script. +NOTE: This file was generated by the dev/update_config_docs.sh script. Do not edit it manually as changes will be overwritten. Instead, edit dev/update_config_docs.sh or the docstrings in datafusion/core/src/config.rs. --> <section id="configuration-settings"> <h1>Configuration Settings<a class="headerlink" href="#configuration-settings" title="Link to this heading">¶</a></h1> -<p>The following configuration options can be passed to <code class="docutils literal notranslate"><span class="pre">SessionConfig</span></code> to control various aspects of query execution.</p> -<p>For applications which do not expose <code class="docutils literal notranslate"><span class="pre">SessionConfig</span></code>, like <code class="docutils literal notranslate"><span class="pre">datafusion-cli</span></code>, these options may also be set via environment variables. -To construct a session with options from the environment, use <code class="docutils literal notranslate"><span class="pre">SessionConfig::from_env</span></code>. -The name of the environment variable is the option’s key, transformed to uppercase and with periods replaced with underscores. -For example, to configure <code class="docutils literal notranslate"><span class="pre">datafusion.execution.batch_size</span></code> you would set the <code class="docutils literal notranslate"><span class="pre">DATAFUSION_EXECUTION_BATCH_SIZE</span></code> environment variable. -Values are parsed according to the <a class="reference external" href="https://docs.rs/arrow/latest/arrow/compute/kernels/cast/fn.cast.html">same rules used in casts from Utf8</a>. -If the value in the environment variable cannot be cast to the type of the configuration option, the default value will be used instead and a warning emitted. -Environment variables are read during <code class="docutils literal notranslate"><span class="pre">SessionConfig</span></code> initialisation so they must be set beforehand and will not affect running sessions.</p> +<p>DataFusion configurations control various aspects of DataFusion planning and execution</p> +<section id="setting-configuration-options"> +<h2>Setting Configuration Options<a class="headerlink" href="#setting-configuration-options" title="Link to this heading">¶</a></h2> +<section id="programmatically"> +<h3>Programmatically<a class="headerlink" href="#programmatically" title="Link to this heading">¶</a></h3> +<p>You can set the options programmatically via the <a class="reference external" href="https://docs.rs/datafusion/latest/datafusion/common/config/struct.ConfigOptions.html"><code class="docutils literal notranslate"><span class="pre">ConfigOptions</span></code></a> object. For +example, to configure the <code class="docutils literal notranslate"><span class="pre">datafusion.execution.target_partitions</span></code> using the API:</p> +<div class="highlight-rust notranslate"><div class="highlight"><pre><span></span><span class="k">use</span><span class="w"> </span><span class="n">datafusion</span><span class="p">::</span><span class="n">common</span><span class="p">::</span><span class="n">config</span><span class="p">::</span><span class="n">ConfigOptions</span><span class="p">;</span> +<span class="kd">let</span><span class="w"> </span><span class="k">mut</span><span class="w"> </span><span class="n">config</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="n">ConfigOptions</span><span class="p">::</span><span class="n">new</span><span class="p">();</span> +<span class="n">config</span><span class="p">.</span><span class="n">execution</span><span class="p">.</span><span class="n">target_partitions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="mi">1</span><span class="p">;</span> +</pre></div> +</div> +</section> +<section id="via-environment-variables"> +<h3>Via Environment Variables<a class="headerlink" href="#via-environment-variables" title="Link to this heading">¶</a></h3> +<p>You can also set configuration options via environment variables using +<a class="reference external" href="https://docs.rs/datafusion/latest/datafusion/common/config/struct.ConfigOptions.html#method.from_env"><code class="docutils literal notranslate"><span class="pre">ConfigOptions::from_env</span></code></a>, for example</p> +<div class="highlight-shell notranslate"><div class="highlight"><pre><span></span><span class="nv">DATAFUSION_EXECUTION_TARGET_PARTITIONS</span><span class="o">=</span><span class="m">1</span><span class="w"> </span>./your_program +</pre></div> +</div> +</section> +<section id="via-sql"> +<h3>Via SQL<a class="headerlink" href="#via-sql" title="Link to this heading">¶</a></h3> +<p>You can also set configuration options via SQL using the <code class="docutils literal notranslate"><span class="pre">SET</span></code> command. For +example, to configure <code class="docutils literal notranslate"><span class="pre">datafusion.execution.target_partitions</span></code>:</p> +<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="k">SET</span><span class="w"> </span><span class="n">datafusion</span><span class="p">.</span><span class="n">execution</span><span class="p">.</span><span class="n">target_partitions</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s1">'1'</span><span class="p">;</span> +</pre></div> +</div> +<p>The following configuration settings are available:</p> <table class="table"> <thead> <tr class="row-odd"><th class="head"><p>key</p></th> @@ -1062,6 +1107,8 @@ Environment variables are read during <code class="docutils literal notranslate" </tbody> </table> </section> +</section> +</section> <section id="runtime-configuration-settings"> <h1>Runtime Configuration Settings<a class="headerlink" href="#runtime-configuration-settings" title="Link to this heading">¶</a></h1> <p>DataFusion runtime configurations can be set via SQL using the <code class="docutils literal notranslate"><span class="pre">SET</span></code> command.</p> --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org For additional commands, e-mail: commits-h...@datafusion.apache.org