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 31f2478d15 Publish built docs triggered by f4d1990370aeec8e5cb4eb1e5dfd54caa9ab6b07 31f2478d15 is described below commit 31f2478d15c332b0f261e393e7007c0570367f12 Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com> AuthorDate: Mon Jun 30 20:18:19 2025 +0000 Publish built docs triggered by f4d1990370aeec8e5cb4eb1e5dfd54caa9ab6b07 --- _sources/library-user-guide/functions/adding-udfs.md.txt | 6 +++--- library-user-guide/functions/adding-udfs.html | 6 +++--- searchindex.js | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/_sources/library-user-guide/functions/adding-udfs.md.txt b/_sources/library-user-guide/functions/adding-udfs.md.txt index 74851b4e59..6471083e60 100644 --- a/_sources/library-user-guide/functions/adding-udfs.md.txt +++ b/_sources/library-user-guide/functions/adding-udfs.md.txt @@ -36,7 +36,7 @@ types of UDFs. ## Adding a Scalar UDF -A Scalar UDF is a function that takes a row of data and returns a single value. In order for good performance +A Scalar UDF is a function that takes a row of data and returns a single value. To achieve good performance, such functions are "vectorized" in DataFusion, meaning they get one or more Arrow Arrays as input and produce an Arrow Array with the same number of rows as output. @@ -48,8 +48,8 @@ To create a Scalar UDF, you In the following example, we will add a function takes a single i64 and returns a single i64 with 1 added to it: -For brevity, we'll skipped some error handling, but e.g. you may want to check that `args.len()` is the expected number -of arguments. +For brevity, we'll skip some error handling. +For production code, you may want to check, for example, that `args.len()` matches the expected number of arguments. ### Adding by `impl ScalarUDFImpl` diff --git a/library-user-guide/functions/adding-udfs.html b/library-user-guide/functions/adding-udfs.html index 88822e529c..fa82e1a477 100644 --- a/library-user-guide/functions/adding-udfs.html +++ b/library-user-guide/functions/adding-udfs.html @@ -743,7 +743,7 @@ types of UDFs.</p> <section id="adding-a-scalar-udf"> <h2>Adding a Scalar UDF<a class="headerlink" href="#adding-a-scalar-udf" title="Link to this heading">¶</a></h2> -<p>A Scalar UDF is a function that takes a row of data and returns a single value. In order for good performance +<p>A Scalar UDF is a function that takes a row of data and returns a single value. To achieve good performance, such functions are “vectorized” in DataFusion, meaning they get one or more Arrow Arrays as input and produce an Arrow Array with the same number of rows as output.</p> <p>To create a Scalar UDF, you</p> @@ -753,8 +753,8 @@ and how to calculate the results.</p></li> <li><p>Create a <code class="docutils literal notranslate"><span class="pre">ScalarUDF</span></code> and register it with <code class="docutils literal notranslate"><span class="pre">SessionContext::register_udf</span></code> so it can be invoked by name.</p></li> </ol> <p>In the following example, we will add a function takes a single i64 and returns a single i64 with 1 added to it:</p> -<p>For brevity, we’ll skipped some error handling, but e.g. you may want to check that <code class="docutils literal notranslate"><span class="pre">args.len()</span></code> is the expected number -of arguments.</p> +<p>For brevity, we’ll skip some error handling. +For production code, you may want to check, for example, that <code class="docutils literal notranslate"><span class="pre">args.len()</span></code> matches the expected number of arguments.</p> <section id="adding-by-impl-scalarudfimpl"> <h3>Adding by <code class="docutils literal notranslate"><span class="pre">impl</span> <span class="pre">ScalarUDFImpl</span></code><a class="headerlink" href="#adding-by-impl-scalarudfimpl" title="Link to this heading">¶</a></h3> <p>This a lower level API with more functionality but is more complex, also documented in <a class="reference external" href="https://github.com/apache/datafusion/blob/main/datafusion-examples/examples/advanced_udf.rs"><code class="docutils literal notranslate"><span class="pre">advanced_udf.rs</span></code></a>.</p> diff --git a/searchindex.js b/searchindex.js index 0ef0e81d2c..cbbb2dbcf1 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 --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@datafusion.apache.org For additional commands, e-mail: commits-h...@datafusion.apache.org