You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by gi...@apache.org on 2023/09/23 10:04:02 UTC
[arrow-datafusion] branch asf-site updated: Publish built docs triggered by 9b45ed992a435bb4724c761bfddd3c98476b732f
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/arrow-datafusion.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 29882a5f58 Publish built docs triggered by 9b45ed992a435bb4724c761bfddd3c98476b732f
29882a5f58 is described below
commit 29882a5f589e438c00b783f29f8a70753a4a7f28
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Sat Sep 23 10:03:56 2023 +0000
Publish built docs triggered by 9b45ed992a435bb4724c761bfddd3c98476b732f
---
_sources/user-guide/example-usage.md.txt | 39 +++++++++++++++++++++++++++++--
searchindex.js | 2 +-
user-guide/example-usage.html | 40 ++++++++++++++++++++++++++++++--
3 files changed, 76 insertions(+), 5 deletions(-)
diff --git a/_sources/user-guide/example-usage.md.txt b/_sources/user-guide/example-usage.md.txt
index 1dc0b63f9a..adaf780558 100644
--- a/_sources/user-guide/example-usage.md.txt
+++ b/_sources/user-guide/example-usage.md.txt
@@ -25,10 +25,11 @@ Even [`more code examples`](../../../datafusion-examples) attached to the projec
## Update `Cargo.toml`
-Add the following to your `Cargo.toml` file:
+Find latest available Datafusion version on [DataFusion's
+crates.io] page. Add the dependency to your `Cargo.toml` file:
```toml
-datafusion = "26"
+datafusion = "31"
tokio = "1.0"
```
@@ -232,3 +233,37 @@ with `native` or at least `avx2`.
```shell
RUSTFLAGS='-C target-cpu=native' cargo +nightly run --release
```
+
+## Enable backtraces
+
+By default Datafusion returns errors as a plain message. There is option to enable more verbose details about the error,
+like error backtrace. To enable a backtrace you need to add Datafusion `backtrace` feature to your `Cargo.toml` file:
+
+```toml
+datafusion = { version = "31.0.0", features = ["backtrace"]}
+```
+
+Set environment [`variables`] https://doc.rust-lang.org/std/backtrace/index.html#environment-variables
+
+```bash
+RUST_BACKTRACE=1 ./target/debug/datafusion-cli
+DataFusion CLI v31.0.0
+❯ select row_numer() over (partition by a order by a) from (select 1 a);
+Error during planning: Invalid function 'row_numer'.
+Did you mean 'ROW_NUMBER'?
+
+backtrace: 0: std::backtrace_rs::backtrace::libunwind::trace
+ at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
+ 1: std::backtrace_rs::backtrace::trace_unsynchronized
+ at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
+ 2: std::backtrace::Backtrace::create
+ at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/backtrace.rs:332:13
+ 3: std::backtrace::Backtrace::capture
+ at /rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/backtrace.rs:298:9
+ 4: datafusion_common::error::DataFusionError::get_back_trace
+ at /arrow-datafusion/datafusion/common/src/error.rs:436:30
+ 5: datafusion_sql::expr::function::<impl datafusion_sql::planner::SqlToRel<S>>::sql_function_to_expr
+ ............
+```
+
+Note: The backtrace wrapped into systems calls, so some steps on top of the backtrace can be ignored
diff --git a/searchindex.js b/searchindex.js
index 717d541bda..a35f89ac0e 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"docnames": ["contributor-guide/architecture", "contributor-guide/communication", "contributor-guide/index", "contributor-guide/quarterly_roadmap", "contributor-guide/roadmap", "contributor-guide/specification/index", "contributor-guide/specification/invariants", "contributor-guide/specification/output-field-name-semantic", "index", "library-user-guide/adding-udfs", "library-user-guide/building-logical-plans", "library-user-guide/catalogs", "library-user-guide/custom-tab [...]
\ No newline at end of file
+Search.setIndex({"docnames": ["contributor-guide/architecture", "contributor-guide/communication", "contributor-guide/index", "contributor-guide/quarterly_roadmap", "contributor-guide/roadmap", "contributor-guide/specification/index", "contributor-guide/specification/invariants", "contributor-guide/specification/output-field-name-semantic", "index", "library-user-guide/adding-udfs", "library-user-guide/building-logical-plans", "library-user-guide/catalogs", "library-user-guide/custom-tab [...]
\ No newline at end of file
diff --git a/user-guide/example-usage.html b/user-guide/example-usage.html
index 590ebd1e56..4f3571677a 100644
--- a/user-guide/example-usage.html
+++ b/user-guide/example-usage.html
@@ -411,6 +411,11 @@
Optimized Configuration
</a>
</li>
+ <li class="toc-h2 nav-item toc-entry">
+ <a class="reference internal nav-link" href="#enable-backtraces">
+ Enable backtraces
+ </a>
+ </li>
</ul>
</nav>
@@ -463,8 +468,9 @@
<p>Even <a class="reference internal" href="#../../../datafusion-examples"><span class="xref myst"><code class="docutils literal notranslate"><span class="pre">more</span> <span class="pre">code</span> <span class="pre">examples</span></code></span></a> attached to the project</p>
<section id="update-cargo-toml">
<h2>Update <code class="docutils literal notranslate"><span class="pre">Cargo.toml</span></code><a class="headerlink" href="#update-cargo-toml" title="Link to this heading">¶</a></h2>
-<p>Add the following to your <code class="docutils literal notranslate"><span class="pre">Cargo.toml</span></code> file:</p>
-<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="n">datafusion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"26"</span>
+<p>Find latest available Datafusion version on <a class="reference external" href="https://crates.io/crates/datafusion">DataFusion’s
+crates.io</a> page. Add the dependency to your <code class="docutils literal notranslate"><span class="pre">Cargo.toml</span></code> file:</p>
+<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="n">datafusion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"31"</span>
<span class="n">tokio</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"1.0"</span>
</pre></div>
</div>
@@ -653,6 +659,36 @@ with <code class="docutils literal notranslate"><span class="pre">native</span><
</pre></div>
</div>
</section>
+<section id="enable-backtraces">
+<h2>Enable backtraces<a class="headerlink" href="#enable-backtraces" title="Link to this heading">¶</a></h2>
+<p>By default Datafusion returns errors as a plain message. There is option to enable more verbose details about the error,
+like error backtrace. To enable a backtrace you need to add Datafusion <code class="docutils literal notranslate"><span class="pre">backtrace</span></code> feature to your <code class="docutils literal notranslate"><span class="pre">Cargo.toml</span></code> file:</p>
+<div class="highlight-toml notranslate"><div class="highlight"><pre><span></span><span class="n">datafusion</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">version</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="s">"31.0.0"</span><span class="p">,</span><span class="w"> </span><span class="n">features</span><span class="w"> </span><span class= [...]
+</pre></div>
+</div>
+<p>Set environment [<code class="docutils literal notranslate"><span class="pre">variables</span></code>] https://doc.rust-lang.org/std/backtrace/index.html#environment-variables</p>
+<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nv">RUST_BACKTRACE</span><span class="o">=</span><span class="m">1</span><span class="w"> </span>./target/debug/datafusion-cli
+DataFusion<span class="w"> </span>CLI<span class="w"> </span>v31.0.0
+❯<span class="w"> </span><span class="k">select</span><span class="w"> </span>row_numer<span class="o">()</span><span class="w"> </span>over<span class="w"> </span><span class="o">(</span>partition<span class="w"> </span>by<span class="w"> </span>a<span class="w"> </span>order<span class="w"> </span>by<span class="w"> </span>a<span class="o">)</span><span class="w"> </span>from<span class="w"> </span><span class="o">(</span><span class="k">select</span><span class="w"> </span><span class [...]
+Error<span class="w"> </span>during<span class="w"> </span>planning:<span class="w"> </span>Invalid<span class="w"> </span><span class="k">function</span><span class="w"> </span><span class="s1">'row_numer'</span>.
+Did<span class="w"> </span>you<span class="w"> </span>mean<span class="w"> </span><span class="s1">'ROW_NUMBER'</span>?
+
+backtrace:<span class="w"> </span><span class="m">0</span>:<span class="w"> </span>std::backtrace_rs::backtrace::libunwind::trace
+<span class="w"> </span>at<span class="w"> </span>/rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
+<span class="w"> </span><span class="m">1</span>:<span class="w"> </span>std::backtrace_rs::backtrace::trace_unsynchronized
+<span class="w"> </span>at<span class="w"> </span>/rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
+<span class="w"> </span><span class="m">2</span>:<span class="w"> </span>std::backtrace::Backtrace::create
+<span class="w"> </span>at<span class="w"> </span>/rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/backtrace.rs:332:13
+<span class="w"> </span><span class="m">3</span>:<span class="w"> </span>std::backtrace::Backtrace::capture
+<span class="w"> </span>at<span class="w"> </span>/rustc/5680fa18feaa87f3ff04063800aec256c3d4b4be/library/std/src/backtrace.rs:298:9
+<span class="w"> </span><span class="m">4</span>:<span class="w"> </span>datafusion_common::error::DataFusionError::get_back_trace
+<span class="w"> </span>at<span class="w"> </span>/arrow-datafusion/datafusion/common/src/error.rs:436:30
+<span class="w"> </span><span class="m">5</span>:<span class="w"> </span>datafusion_sql::expr::function::<impl<span class="w"> </span>datafusion_sql::planner::SqlToRel<S>>::sql_function_to_expr
+<span class="w"> </span>............
+</pre></div>
+</div>
+<p>Note: The backtrace wrapped into systems calls, so some steps on top of the backtrace can be ignored</p>
+</section>
</section>