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 a9ec5a0577 Publish built docs triggered by
1840ab5331391d278de55d2bfb9a019c93314427
a9ec5a0577 is described below
commit a9ec5a0577c92d19b6c5f88266f35a8a0ab768ce
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jul 2 16:22:39 2024 +0000
Publish built docs triggered by 1840ab5331391d278de55d2bfb9a019c93314427
---
.../aggregate_function.rs | 11 +------
_sources/contributor-guide/testing.md.txt | 25 +++++++++++++++
_sources/user-guide/expressions.md.txt | 4 ++-
contributor-guide/testing.html | 37 ++++++++++++++++++++++
searchindex.js | 2 +-
user-guide/expressions.html | 5 +--
6 files changed, 70 insertions(+), 14 deletions(-)
diff --git a/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
b/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
index b17e4294a1..760952d948 100644
--- a/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
+++ b/_downloads/f9718f9b04809de030b1693c73858f19/aggregate_function.rs
@@ -41,8 +41,6 @@ pub enum AggregateFunction {
ArrayAgg,
/// N'th value in a group according to some ordering
NthValue,
- /// Grouping
- Grouping,
}
impl AggregateFunction {
@@ -53,7 +51,6 @@ impl AggregateFunction {
Max => "MAX",
ArrayAgg => "ARRAY_AGG",
NthValue => "NTH_VALUE",
- Grouping => "GROUPING",
}
}
}
@@ -73,8 +70,6 @@ impl FromStr for AggregateFunction {
"min" => AggregateFunction::Min,
"array_agg" => AggregateFunction::ArrayAgg,
"nth_value" => AggregateFunction::NthValue,
- // other
- "grouping" => AggregateFunction::Grouping,
_ => {
return plan_err!("There is no built-in function named {name}");
}
@@ -119,7 +114,6 @@ impl AggregateFunction {
coerced_data_types[0].clone(),
input_expr_nullable[0],
)))),
- AggregateFunction::Grouping => Ok(DataType::Int32),
AggregateFunction::NthValue => Ok(coerced_data_types[0].clone()),
}
}
@@ -130,7 +124,6 @@ impl AggregateFunction {
match self {
AggregateFunction::Max | AggregateFunction::Min => Ok(true),
AggregateFunction::ArrayAgg => Ok(false),
- AggregateFunction::Grouping => Ok(true),
AggregateFunction::NthValue => Ok(true),
}
}
@@ -141,9 +134,7 @@ impl AggregateFunction {
pub fn signature(&self) -> Signature {
// note: the physical expression must accept the type returned by this
function or the execution panics.
match self {
- AggregateFunction::Grouping | AggregateFunction::ArrayAgg => {
- Signature::any(1, Volatility::Immutable)
- }
+ AggregateFunction::ArrayAgg => Signature::any(1,
Volatility::Immutable),
AggregateFunction::Min | AggregateFunction::Max => {
let valid = STRINGS
.iter()
diff --git a/_sources/contributor-guide/testing.md.txt
b/_sources/contributor-guide/testing.md.txt
index 11f53bcb2a..018cc6233c 100644
--- a/_sources/contributor-guide/testing.md.txt
+++ b/_sources/contributor-guide/testing.md.txt
@@ -49,6 +49,31 @@ You can run these tests individually using `cargo` as normal
command such as
cargo test -p datafusion --test parquet_exec
```
+## Documentation Examples
+
+We use Rust [doctest] to verify examples from the documentation are correct and
+up-to-date. These tests are run as part of our CI and you can run them them
+locally with the following command:
+
+```shell
+cargo test --doc
+```
+
+### API Documentation Examples
+
+As with other Rust projects, examples in doc comments in `.rs` files are
+automatically checked to ensure they work and evolve along with the code.
+
+### User Guide Documentation
+
+Rust example code from the user guide (anything marked with \`\`\`rust) is also
+tested in the same way using the [doc_comment] crate. See the end of
+[core/src/lib.rs] for more details.
+
+[doctest]: https://doc.rust-lang.org/rust-by-example/testing/doc_testing.html
+[doc_comment]: https://docs.rs/doc-comment/latest/doc_comment
+[core/src/lib.rs]:
https://github.com/apache/datafusion/blob/main/datafusion/core/src/lib.rs#L583
+
## Benchmarks
### Criterion Benchmarks
diff --git a/_sources/user-guide/expressions.md.txt
b/_sources/user-guide/expressions.md.txt
index cae9627210..6e693a0e70 100644
--- a/_sources/user-guide/expressions.md.txt
+++ b/_sources/user-guide/expressions.md.txt
@@ -26,8 +26,10 @@ available for creating logical expressions. These are
documented below.
Most functions and methods may receive and return an `Expr`, which can be
chained together using a fluent-style API:
```rust
+use datafusion::prelude::*;
// create the expression `(a > 6) AND (b < 7)`
-col("a").gt(lit(6)).and(col("b").lt(lit(7)))
+col("a").gt(lit(6)).and(col("b").lt(lit(7)));
+
```
:::
diff --git a/contributor-guide/testing.html b/contributor-guide/testing.html
index d7f36e70e8..f742edd971 100644
--- a/contributor-guide/testing.html
+++ b/contributor-guide/testing.html
@@ -485,6 +485,23 @@
</li>
</ul>
</li>
+ <li class="toc-h2 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#documentation-examples">
+ Documentation Examples
+ </a>
+ <ul class="nav section-nav flex-column">
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#api-documentation-examples">
+ API Documentation Examples
+ </a>
+ </li>
+ <li class="toc-h3 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#user-guide-documentation">
+ User Guide Documentation
+ </a>
+ </li>
+ </ul>
+ </li>
<li class="toc-h2 nav-item toc-entry">
<a class="reference internal nav-link" href="#benchmarks">
Benchmarks
@@ -584,6 +601,26 @@ and tries to follow the Rust standard <a class="reference
external" href="https:
</div>
</section>
</section>
+<section id="documentation-examples">
+<h2>Documentation Examples<a class="headerlink" href="#documentation-examples"
title="Link to this heading">¶</a></h2>
+<p>We use Rust <a class="reference external"
href="https://doc.rust-lang.org/rust-by-example/testing/doc_testing.html">doctest</a>
to verify examples from the documentation are correct and
+up-to-date. These tests are run as part of our CI and you can run them them
+locally with the following command:</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>--doc
+</pre></div>
+</div>
+<section id="api-documentation-examples">
+<h3>API Documentation Examples<a class="headerlink"
href="#api-documentation-examples" title="Link to this heading">¶</a></h3>
+<p>As with other Rust projects, examples in doc comments in <code
class="docutils literal notranslate"><span class="pre">.rs</span></code> files
are
+automatically checked to ensure they work and evolve along with the code.</p>
+</section>
+<section id="user-guide-documentation">
+<h3>User Guide Documentation<a class="headerlink"
href="#user-guide-documentation" title="Link to this heading">¶</a></h3>
+<p>Rust example code from the user guide (anything marked with ```rust) is also
+tested in the same way using the <a class="reference external"
href="https://docs.rs/doc-comment/latest/doc_comment">doc_comment</a> crate.
See the end of
+<a class="reference external"
href="https://github.com/apache/datafusion/blob/main/datafusion/core/src/lib.rs#L583">core/src/lib.rs</a>
for more details.</p>
+</section>
+</section>
<section id="benchmarks">
<h2>Benchmarks<a class="headerlink" href="#benchmarks" title="Link to this
heading">¶</a></h2>
<section id="criterion-benchmarks">
diff --git a/searchindex.js b/searchindex.js
index a6d4a0d9a4..cd3f0f3759 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"!=": [[43, "op-neq"]], "!~": [[43,
"op-re-not-match"]], "!~*": [[43, "op-re-not-match-i"]], "!~~": [[43, "id18"]],
"!~~*": [[43, "id19"]], "#": [[43, "op-bit-xor"]], "%": [[43, "op-modulo"]],
"&": [[43, "op-bit-and"]], "(relation, name) tuples in logical fields and
logical columns are unique": [[10,
"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]], "*":
[[43, "op-multiply"]], "+": [[43, "op-plus"]], "-": [[43, "op-minus"]], "/": [[
[...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"!=": [[43, "op-neq"]], "!~": [[43,
"op-re-not-match"]], "!~*": [[43, "op-re-not-match-i"]], "!~~": [[43, "id18"]],
"!~~*": [[43, "id19"]], "#": [[43, "op-bit-xor"]], "%": [[43, "op-modulo"]],
"&": [[43, "op-bit-and"]], "(relation, name) tuples in logical fields and
logical columns are unique": [[10,
"relation-name-tuples-in-logical-fields-and-logical-columns-are-unique"]], "*":
[[43, "op-multiply"]], "+": [[43, "op-plus"]], "-": [[43, "op-minus"]], "/": [[
[...]
\ No newline at end of file
diff --git a/user-guide/expressions.html b/user-guide/expressions.html
index 3f62740d98..3652965310 100644
--- a/user-guide/expressions.html
+++ b/user-guide/expressions.html
@@ -606,8 +606,9 @@ available for creating logical expressions. These are
documented below.</p>
<div class="admonition tip">
<p class="admonition-title">Tip</p>
<p>Most functions and methods may receive and return an <code class="docutils
literal notranslate"><span class="pre">Expr</span></code>, which can be chained
together using a fluent-style API:</p>
-<div class="highlight-rust notranslate"><div
class="highlight"><pre><span></span><span class="c1">// create the expression
`(a > 6) AND (b < 7)`</span>
-<span class="n">col</span><span class="p">(</span><span
class="s">"a"</span><span class="p">).</span><span
class="n">gt</span><span class="p">(</span><span class="n">lit</span><span
class="p">(</span><span class="mi">6</span><span class="p">)).</span><span
class="n">and</span><span class="p">(</span><span class="n">col</span><span
class="p">(</span><span class="s">"b"</span><span
class="p">).</span><span class="n">lt</span><span class="p">(</span><span
class="n">lit</ [...]
+<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">prelude</span><span class="p">::</span><span class="o">*</span><span
class="p">;</span>
+<span class="c1">// create the expression `(a > 6) AND (b < 7)`</span>
+<span class="n">col</span><span class="p">(</span><span
class="s">"a"</span><span class="p">).</span><span
class="n">gt</span><span class="p">(</span><span class="n">lit</span><span
class="p">(</span><span class="mi">6</span><span class="p">)).</span><span
class="n">and</span><span class="p">(</span><span class="n">col</span><span
class="p">(</span><span class="s">"b"</span><span
class="p">).</span><span class="n">lt</span><span class="p">(</span><span
class="n">lit</ [...]
</pre></div>
</div>
</div>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]