You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@datafusion.apache.org by gi...@apache.org on 2026/08/20 20:45:37 UTC
(datafusion-comet) branch asf-site updated: Publish built docs triggered by 91f9fbed24ee28f99b23ed559e80e818c9696044
This is an automated email from the ASF dual-hosted git repository.
github-actions[bot] pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion-comet.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 4ab63c955e Publish built docs triggered by 91f9fbed24ee28f99b23ed559e80e818c9696044
4ab63c955e is described below
commit 4ab63c955eb621006605b8bb3beb8da8216795ad
Author: github-actions[bot] <gi...@users.noreply.github.com>
AuthorDate: Thu Aug 20 20:45:32 2026 +0000
Publish built docs triggered by 91f9fbed24ee28f99b23ed559e80e818c9696044
---
_sources/contributor-guide/sql-file-tests.md.txt | 18 ++++++++++++++++++
contributor-guide/sql-file-tests.html | 17 +++++++++++++++++
searchindex.js | 2 +-
3 files changed, 36 insertions(+), 1 deletion(-)
diff --git a/_sources/contributor-guide/sql-file-tests.md.txt b/_sources/contributor-guide/sql-file-tests.md.txt
index 9b63dcf8ed..a92e0898d7 100644
--- a/_sources/contributor-guide/sql-file-tests.md.txt
+++ b/_sources/contributor-guide/sql-file-tests.md.txt
@@ -169,9 +169,17 @@ SELECT some_expression(v) FROM test_table
Checks results with a numeric tolerance. Useful for floating-point functions where small
differences are acceptable.
+The comparison ignores the sign of zero (`+0.0` matches `-0.0`) and the sign of infinity
+(`+Infinity` matches `-Infinity`). Keep tolerance for ordinary values and add a plain
+`query` for cases whose expected result is signed zero or signed infinity.
+
```sql
query tolerance=0.0001
SELECT cos(v) FROM test_trig
+
+-- csc(-0.0) == -Infinity; a tolerance check would also accept +Infinity
+query
+SELECT csc(double('-0.0'))
```
#### `query expect_fallback(<reason>)`
@@ -294,6 +302,16 @@ common ones include:
- **Zero, negative, and very large numbers** -- for numeric functions
- **Boundary values** -- `INT_MIN`, `INT_MAX`, `NaN`, `Infinity`, `-Infinity` for numeric
types
+- **Signed zero** -- Spark parses a bare `-0.0` as `decimal(1,1)`, which has no signed
+ zero, so coercion to `float`/`double` yields `+0.0`. `CAST(-0.0 AS DOUBLE)` and
+ `CAST(-0.0 AS FLOAT)` have the same problem because the cast source is still the
+ decimal literal. Use `double('-0.0')` or `float('-0.0')` (equivalently
+ `CAST('-0.0' AS DOUBLE)`). Spark's array comparator also treats `+0.0` and `-0.0` as
+ equal, so `sort_array(...)` is not a unique projection when both signs are present
+ (the SQL test comparator distinguishes the bits). Prefer a sign-aware form such as
+ `sort_array(transform(arr, x -> cast(x AS string)))`. A `query tolerance=...` check
+ likewise treats the two zero signs as equal, and `+Infinity` / `-Infinity` as equal,
+ so signed-zero and signed-infinity results need a separate plain `query`.
- **Special characters and multibyte UTF-8** -- for string functions (e.g. `'é'`, `'中文'`,
`'\t'`)
- **Empty arrays/maps** -- for collection functions
diff --git a/contributor-guide/sql-file-tests.html b/contributor-guide/sql-file-tests.html
index c85ed7c950..bb385d5f87 100644
--- a/contributor-guide/sql-file-tests.html
+++ b/contributor-guide/sql-file-tests.html
@@ -674,8 +674,15 @@ correct results.</p>
<h4><code class="docutils literal notranslate"><span class="pre">query</span> <span class="pre">tolerance=<value></span></code><a class="headerlink" href="#query-tolerance-value" title="Link to this heading">#</a></h4>
<p>Checks results with a numeric tolerance. Useful for floating-point functions where small
differences are acceptable.</p>
+<p>The comparison ignores the sign of zero (<code class="docutils literal notranslate"><span class="pre">+0.0</span></code> matches <code class="docutils literal notranslate"><span class="pre">-0.0</span></code>) and the sign of infinity
+(<code class="docutils literal notranslate"><span class="pre">+Infinity</span></code> matches <code class="docutils literal notranslate"><span class="pre">-Infinity</span></code>). Keep tolerance for ordinary values and add a plain
+<code class="docutils literal notranslate"><span class="pre">query</span></code> for cases whose expected result is signed zero or signed infinity.</p>
<div class="highlight-sql notranslate"><div class="highlight"><pre><span></span><span class="n">query</span><span class="w"> </span><span class="n">tolerance</span><span class="o">=</span><span class="mi">0</span><span class="p">.</span><span class="mi">0001</span>
<span class="k">SELECT</span><span class="w"> </span><span class="n">cos</span><span class="p">(</span><span class="n">v</span><span class="p">)</span><span class="w"> </span><span class="k">FROM</span><span class="w"> </span><span class="n">test_trig</span>
+
+<span class="c1">-- csc(-0.0) == -Infinity; a tolerance check would also accept +Infinity</span>
+<span class="n">query</span>
+<span class="k">SELECT</span><span class="w"> </span><span class="n">csc</span><span class="p">(</span><span class="n">double</span><span class="p">(</span><span class="s1">'-0.0'</span><span class="p">))</span>
</pre></div>
</div>
</section>
@@ -789,6 +796,16 @@ common ones include:</p>
<li><p><strong>Zero, negative, and very large numbers</strong> – for numeric functions</p></li>
<li><p><strong>Boundary values</strong> – <code class="docutils literal notranslate"><span class="pre">INT_MIN</span></code>, <code class="docutils literal notranslate"><span class="pre">INT_MAX</span></code>, <code class="docutils literal notranslate"><span class="pre">NaN</span></code>, <code class="docutils literal notranslate"><span class="pre">Infinity</span></code>, <code class="docutils literal notranslate"><span class="pre">-Infinity</span></code> for numeric
types</p></li>
+<li><p><strong>Signed zero</strong> – Spark parses a bare <code class="docutils literal notranslate"><span class="pre">-0.0</span></code> as <code class="docutils literal notranslate"><span class="pre">decimal(1,1)</span></code>, which has no signed
+zero, so coercion to <code class="docutils literal notranslate"><span class="pre">float</span></code>/<code class="docutils literal notranslate"><span class="pre">double</span></code> yields <code class="docutils literal notranslate"><span class="pre">+0.0</span></code>. <code class="docutils literal notranslate"><span class="pre">CAST(-0.0</span> <span class="pre">AS</span> <span class="pre">DOUBLE)</span></code> and
+<code class="docutils literal notranslate"><span class="pre">CAST(-0.0</span> <span class="pre">AS</span> <span class="pre">FLOAT)</span></code> have the same problem because the cast source is still the
+decimal literal. Use <code class="docutils literal notranslate"><span class="pre">double('-0.0')</span></code> or <code class="docutils literal notranslate"><span class="pre">float('-0.0')</span></code> (equivalently
+<code class="docutils literal notranslate"><span class="pre">CAST('-0.0'</span> <span class="pre">AS</span> <span class="pre">DOUBLE)</span></code>). Spark’s array comparator also treats <code class="docutils literal notranslate"><span class="pre">+0.0</span></code> and <code class="docutils literal notranslate"><span class="pre">-0.0</span></code> as
+equal, so <code class="docutils literal notranslate"><span class="pre">sort_array(...)</span></code> is not a unique projection when both signs are present
+(the SQL test comparator distinguishes the bits). Prefer a sign-aware form such as
+<code class="docutils literal notranslate"><span class="pre">sort_array(transform(arr,</span> <span class="pre">x</span> <span class="pre">-></span> <span class="pre">cast(x</span> <span class="pre">AS</span> <span class="pre">string)))</span></code>. A <code class="docutils literal notranslate"><span class="pre">query</span> <span class="pre">tolerance=...</span></code> check
+likewise treats the two zero signs as equal, and <code class="docutils literal notranslate"><span class="pre">+Infinity</span></code> / <code class="docutils literal notranslate"><span class="pre">-Infinity</span></code> as equal,
+so signed-zero and signed-infinity results need a separate plain <code class="docutils literal notranslate"><span class="pre">query</span></code>.</p></li>
<li><p><strong>Special characters and multibyte UTF-8</strong> – for string functions (e.g. <code class="docutils literal notranslate"><span class="pre">'é'</span></code>, <code class="docutils literal notranslate"><span class="pre">'中文'</span></code>,
<code class="docutils literal notranslate"><span class="pre">'\t'</span></code>)</p></li>
<li><p><strong>Empty arrays/maps</strong> – for collection functions</p></li>
diff --git a/searchindex.js b/searchindex.js
index 6d67fb9297..9c7aa38424 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"!": [[55, "id1"]], "%": [[53, "id1"]], "&": [[43, "id1"]], "*": [[53, "id2"]], "+": [[53, "id3"]], "-": [[53, "id4"]], "/": [[53, "id5"]], "1. Format Your Code": [[40, "format-your-code"]], "1. Install Comet": [[61, "install-comet"], [71, "install-comet"]], "1. Native Operators (nativeExecs map)": [[28, "native-operators-nativeexecs-map"]], "2. Build and Verify": [[40, "build-and-verify"]], "2. Clone Iceberg and Apply Diff": [[61, "clone-iceberg-and-apply- [...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"!": [[55, "id1"]], "%": [[53, "id1"]], "&": [[43, "id1"]], "*": [[53, "id2"]], "+": [[53, "id3"]], "-": [[53, "id4"]], "/": [[53, "id5"]], "1. Format Your Code": [[40, "format-your-code"]], "1. Install Comet": [[61, "install-comet"], [71, "install-comet"]], "1. Native Operators (nativeExecs map)": [[28, "native-operators-nativeexecs-map"]], "2. Build and Verify": [[40, "build-and-verify"]], "2. Clone Iceberg and Apply Diff": [[61, "clone-iceberg-and-apply- [...]
\ No newline at end of file
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@datafusion.apache.org
For additional commands, e-mail: commits-help@datafusion.apache.org