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 bd28d0d959 Publish built docs triggered by
e50b9398d0cad90f498d0f0cea3a6394fdabfbda
bd28d0d959 is described below
commit bd28d0d959bd7937b0bbb8ceab1c5cbac615e6c0
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Nov 23 14:39:59 2025 +0000
Publish built docs triggered by e50b9398d0cad90f498d0f0cea3a6394fdabfbda
---
_sources/contributor-guide/testing.md.txt | 32 ++++++++++++++++++++++++++-----
contributor-guide/testing.html | 28 +++++++++++++++++++--------
searchindex.js | 2 +-
3 files changed, 48 insertions(+), 14 deletions(-)
diff --git a/_sources/contributor-guide/testing.md.txt
b/_sources/contributor-guide/testing.md.txt
index dd22e12360..81ceabb646 100644
--- a/_sources/contributor-guide/testing.md.txt
+++ b/_sources/contributor-guide/testing.md.txt
@@ -46,19 +46,41 @@ cargo nextest run
## Unit tests
Tests for code in an individual module are defined in the same source file
with a `test` module, following Rust convention.
-The
[test_util](https://github.com/apache/datafusion/tree/main/datafusion/common/src/test_util.rs)
module provides useful macros to write unit tests effectively, such as
`assert_batches_sorted_eq` and `assert_batches_eq` for RecordBatches and
`assert_contains` / `assert_not_contains` which are used extensively in the
codebase.
+
+For example, to run tests in the `datafusion` crate:
+
+```shell
+cargo test -p datafusion
+```
+
+The [test_util] module provides useful macros to write unit tests effectively,
such as [`assert_batches_sorted_eq`] and [`assert_batches_eq`] for
RecordBatches and [`assert_contains`] / [`assert_not_contains`] which are used
extensively in the codebase.
+
+[test_util]:
https://github.com/apache/datafusion/tree/main/datafusion/common/src/test_util.rs
+[`assert_batches_sorted_eq`]:
https://docs.rs/datafusion/latest/datafusion/macro.assert_batches_sorted_eq.html
+[`assert_batches_eq`]:
https://docs.rs/datafusion/latest/datafusion/macro.assert_batches_eq.html
+[`assert_contains`]:
https://docs.rs/datafusion/latest/datafusion/common/macro.assert_contains.html
+[`assert_not_contains`]:
https://docs.rs/datafusion/latest/datafusion/common/macro.assert_not_contains.html
## sqllogictests Tests
-DataFusion's SQL implementation is tested using
[sqllogictest](https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest)
which are run like other tests using `cargo test --test sqllogictests`.
+DataFusion's SQL implementation is tested using
[sqllogictest](https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest).
You can run these tests with commands like:
+
+```shell
+# Run all tests
+cargo test --profile=ci --test sqllogictests
+# Run a specific test file
+cargo test --profile=ci --test sqllogictests -- aggregate.slt
+# Run and update expected outputs
+cargo test --profile=ci --test sqllogictests -- --complete
+```
-`sqllogictests` tests may be less convenient for new contributors who are
familiar with writing `.rs` tests as they require learning another tool.
However, `sqllogictest` based tests are much easier to develop and maintain as
they 1) do not require a slow recompile/link cycle and 2) can be automatically
updated via `cargo test --test sqllogictests -- --complete`.
+`sqllogictests` may be less convenient for new contributors who are familiar
with writing `.rs` tests as they require learning another tool. However,
`sqllogictest` based tests are much easier to develop and maintain as they 1)
do not require a slow recompile/link cycle and 2) can be automatically updated.
Like similar systems such as [DuckDB](https://duckdb.org/dev/testing),
DataFusion has chosen to trade off a slightly higher barrier to contribution
for longer term maintainability.
DataFusion has integrated [sqlite's test
suite](https://sqlite.org/sqllogictest/doc/trunk/about.wiki) as a supplemental
test suite that is run whenever a PR is merged into DataFusion. To run it
manually please refer to the
[README](https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/README.md#running-tests-sqlite)
file for instructions.
-## Snapshot testing
+## Snapshot testing (`cargo insta`)
[Insta](https://github.com/mitsuhiko/insta) is used for snapshot testing.
Snapshots are generated
and compared on each test run. If the output changes, tests will fail.
@@ -90,7 +112,7 @@ There are several public interface tests for the DataFusion
library in the [test
You can run these tests individually using `cargo` as normal command such as
```shell
-cargo test -p datafusion --test parquet_exec
+cargo test -p datafusion --test parquet_integration
```
## SQL "Fuzz" testing
diff --git a/contributor-guide/testing.html b/contributor-guide/testing.html
index b017aa35f8..3d9ed2c6a5 100644
--- a/contributor-guide/testing.html
+++ b/contributor-guide/testing.html
@@ -418,18 +418,30 @@ the Rust standard <a class="reference external"
href="https://doc.rust-lang.org/
</div>
<section id="unit-tests">
<h2>Unit tests<a class="headerlink" href="#unit-tests" title="Link to this
heading">#</a></h2>
-<p>Tests for code in an individual module are defined in the same source file
with a <code class="docutils literal notranslate"><span
class="pre">test</span></code> module, following Rust convention.
-The <a class="reference external"
href="https://github.com/apache/datafusion/tree/main/datafusion/common/src/test_util.rs">test_util</a>
module provides useful macros to write unit tests effectively, such as <code
class="docutils literal notranslate"><span
class="pre">assert_batches_sorted_eq</span></code> and <code class="docutils
literal notranslate"><span class="pre">assert_batches_eq</span></code> for
RecordBatches and <code class="docutils literal notranslate"><span
class="pre">asse [...]
+<p>Tests for code in an individual module are defined in the same source file
with a <code class="docutils literal notranslate"><span
class="pre">test</span></code> module, following Rust convention.</p>
+<p>For example, to run tests in the <code class="docutils literal
notranslate"><span class="pre">datafusion</span></code> crate:</p>
+<div class="highlight-shell notranslate"><div
class="highlight"><pre><span></span>cargo<span class="w"> </span><span
class="nb">test</span><span class="w"> </span>-p<span class="w">
</span>datafusion
+</pre></div>
+</div>
+<p>The <a class="reference external"
href="https://github.com/apache/datafusion/tree/main/datafusion/common/src/test_util.rs">test_util</a>
module provides useful macros to write unit tests effectively, such as <a
class="reference external"
href="https://docs.rs/datafusion/latest/datafusion/macro.assert_batches_sorted_eq.html"><code
class="docutils literal notranslate"><span
class="pre">assert_batches_sorted_eq</span></code></a> and <a class="reference
external" href="https://docs.rs/dat [...]
</section>
<section id="sqllogictests-tests">
<h2>sqllogictests Tests<a class="headerlink" href="#sqllogictests-tests"
title="Link to this heading">#</a></h2>
-<p>DataFusion’s SQL implementation is tested using <a class="reference
external"
href="https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest">sqllogictest</a>
which are run like other tests using <code class="docutils literal
notranslate"><span class="pre">cargo</span> <span class="pre">test</span> <span
class="pre">--test</span> <span class="pre">sqllogictests</span></code>.</p>
-<p><code class="docutils literal notranslate"><span
class="pre">sqllogictests</span></code> tests may be less convenient for new
contributors who are familiar with writing <code class="docutils literal
notranslate"><span class="pre">.rs</span></code> tests as they require learning
another tool. However, <code class="docutils literal notranslate"><span
class="pre">sqllogictest</span></code> based tests are much easier to develop
and maintain as they 1) do not require a slow recompile/link [...]
+<p>DataFusion’s SQL implementation is tested using <a class="reference
external"
href="https://github.com/apache/datafusion/tree/main/datafusion/sqllogictest">sqllogictest</a>.
You can run these tests with commands like:</p>
+<div class="highlight-shell notranslate"><div
class="highlight"><pre><span></span><span class="c1"># Run all tests</span>
+cargo<span class="w"> </span><span class="nb">test</span><span class="w">
</span>--profile<span class="o">=</span>ci<span class="w"> </span>--test<span
class="w"> </span>sqllogictests
+<span class="c1"># Run a specific test file</span>
+cargo<span class="w"> </span><span class="nb">test</span><span class="w">
</span>--profile<span class="o">=</span>ci<span class="w"> </span>--test<span
class="w"> </span>sqllogictests<span class="w"> </span>--<span class="w">
</span>aggregate.slt
+<span class="c1"># Run and update expected outputs</span>
+cargo<span class="w"> </span><span class="nb">test</span><span class="w">
</span>--profile<span class="o">=</span>ci<span class="w"> </span>--test<span
class="w"> </span>sqllogictests<span class="w"> </span>--<span class="w">
</span>--complete
+</pre></div>
+</div>
+<p><code class="docutils literal notranslate"><span
class="pre">sqllogictests</span></code> may be less convenient for new
contributors who are familiar with writing <code class="docutils literal
notranslate"><span class="pre">.rs</span></code> tests as they require learning
another tool. However, <code class="docutils literal notranslate"><span
class="pre">sqllogictest</span></code> based tests are much easier to develop
and maintain as they 1) do not require a slow recompile/link cycle [...]
<p>Like similar systems such as <a class="reference external"
href="https://duckdb.org/dev/testing">DuckDB</a>, DataFusion has chosen to
trade off a slightly higher barrier to contribution for longer term
maintainability.</p>
<p>DataFusion has integrated <a class="reference external"
href="https://sqlite.org/sqllogictest/doc/trunk/about.wiki">sqlite’s test
suite</a> as a supplemental test suite that is run whenever a PR is merged into
DataFusion. To run it manually please refer to the <a class="reference
external"
href="https://github.com/apache/datafusion/blob/main/datafusion/sqllogictest/README.md#running-tests-sqlite">README</a>
file for instructions.</p>
</section>
-<section id="snapshot-testing">
-<h2>Snapshot testing<a class="headerlink" href="#snapshot-testing" title="Link
to this heading">#</a></h2>
+<section id="snapshot-testing-cargo-insta">
+<h2>Snapshot testing (<code class="docutils literal notranslate"><span
class="pre">cargo</span> <span class="pre">insta</span></code>)<a
class="headerlink" href="#snapshot-testing-cargo-insta" title="Link to this
heading">#</a></h2>
<p><a class="reference external"
href="https://github.com/mitsuhiko/insta">Insta</a> is used for snapshot
testing. Snapshots are generated
and compared on each test run. If the output changes, tests will fail.</p>
<p>To review the changes, you can use Insta CLI:</p>
@@ -452,7 +464,7 @@ locally by following the <a class="reference external"
href="https://github.com/
<h2>Rust Integration Tests<a class="headerlink" href="#rust-integration-tests"
title="Link to this heading">#</a></h2>
<p>There are several public interface tests for the DataFusion library in the
<a class="reference external"
href="https://github.com/apache/datafusion/tree/main/datafusion/core/tests">tests</a>
directory.</p>
<p>You can run these tests individually using <code class="docutils literal
notranslate"><span class="pre">cargo</span></code> as normal command such as</p>
-<div class="highlight-shell notranslate"><div
class="highlight"><pre><span></span>cargo<span class="w"> </span><span
class="nb">test</span><span class="w"> </span>-p<span class="w">
</span>datafusion<span class="w"> </span>--test<span class="w">
</span>parquet_exec
+<div class="highlight-shell notranslate"><div
class="highlight"><pre><span></span>cargo<span class="w"> </span><span
class="nb">test</span><span class="w"> </span>-p<span class="w">
</span>datafusion<span class="w"> </span>--test<span class="w">
</span>parquet_integration
</pre></div>
</div>
</section>
@@ -577,7 +589,7 @@ tested in the same way using the <a class="reference
external" href="https://doc
<ul class="visible nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#unit-tests">Unit tests</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#sqllogictests-tests">sqllogictests Tests</a></li>
-<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#snapshot-testing">Snapshot testing</a></li>
+<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#snapshot-testing-cargo-insta">Snapshot testing (<code class="docutils
literal notranslate"><span class="pre">cargo</span> <span
class="pre">insta</span></code>)</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#extended-tests">Extended Tests</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#rust-integration-tests">Rust Integration Tests</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link"
href="#sql-fuzz-testing">SQL “Fuzz” testing</a></li>
diff --git a/searchindex.js b/searchindex.js
index 916d59792f..1378b483c6 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles":{"!=":[[60,"op-neq"]],"!~":[[60,"op-re-not-match"]],"!~*":[[60,"op-re-not-match-i"]],"!~~":[[60,"id19"]],"!~~*":[[60,"id20"]],"#":[[60,"op-bit-xor"]],"%":[[60,"op-modulo"]],"&":[[60,"op-bit-and"]],"(relation,
name) tuples in logical fields and logical columns are
unique":[[13,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[60,"op-multiply"]],"+":[[60,"op-plus"]],"-":[[60,"op-minus"]],"/":[[60,"op-divide"]],"<":[[60,"op-lt"]],"<
[...]
\ No newline at end of file
+Search.setIndex({"alltitles":{"!=":[[60,"op-neq"]],"!~":[[60,"op-re-not-match"]],"!~*":[[60,"op-re-not-match-i"]],"!~~":[[60,"id19"]],"!~~*":[[60,"id20"]],"#":[[60,"op-bit-xor"]],"%":[[60,"op-modulo"]],"&":[[60,"op-bit-and"]],"(relation,
name) tuples in logical fields and logical columns are
unique":[[13,"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]],"*":[[60,"op-multiply"]],"+":[[60,"op-plus"]],"-":[[60,"op-minus"]],"/":[[60,"op-divide"]],"<":[[60,"op-lt"]],"<
[...]
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]