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-comet.git


The following commit(s) were added to refs/heads/asf-site by this push:
     new 609b78c48 Publish built docs triggered by 
2c6a8ac7813e66527b7247f28aace530187c2764
609b78c48 is described below

commit 609b78c48e8f610ba7bc7a3940be47777cb08262
Author: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri Feb 6 00:57:34 2026 +0000

    Publish built docs triggered by 2c6a8ac7813e66527b7247f28aace530187c2764
---
 _sources/contributor-guide/sql-file-tests.md.txt | 21 +++++++++++++++++++++
 contributor-guide/sql-file-tests.html            | 20 ++++++++++++++++++++
 searchindex.js                                   |  2 +-
 3 files changed, 42 insertions(+), 1 deletion(-)

diff --git a/_sources/contributor-guide/sql-file-tests.md.txt 
b/_sources/contributor-guide/sql-file-tests.md.txt
index b2dee3a3b..1a55323b8 100644
--- a/_sources/contributor-guide/sql-file-tests.md.txt
+++ b/_sources/contributor-guide/sql-file-tests.md.txt
@@ -194,6 +194,27 @@ query 
ignore(https://github.com/apache/datafusion-comet/issues/3326)
 SELECT space(n) FROM test_space WHERE n < 0
 ```
 
+#### `query expect_error(<pattern>)`
+
+Asserts that both Spark and Comet throw an exception containing the given 
pattern. Use this
+for ANSI mode tests where invalid operations should throw errors.
+
+```sql
+-- Config: spark.sql.ansi.enabled=true
+
+-- integer overflow should throw in ANSI mode
+query expect_error(ARITHMETIC_OVERFLOW)
+SELECT 2147483647 + 1
+
+-- division by zero should throw in ANSI mode
+query expect_error(DIVIDE_BY_ZERO)
+SELECT 1 / 0
+
+-- array out of bounds should throw in ANSI mode
+query expect_error(INVALID_ARRAY_INDEX)
+SELECT array(1, 2, 3)[10]
+```
+
 ## Adding a new test
 
 1. Create a `.sql` file under the appropriate subdirectory in
diff --git a/contributor-guide/sql-file-tests.html 
b/contributor-guide/sql-file-tests.html
index f24b54898..b61d5d167 100644
--- a/contributor-guide/sql-file-tests.html
+++ b/contributor-guide/sql-file-tests.html
@@ -608,6 +608,26 @@ link to the tracking GitHub issue.</p>
 </pre></div>
 </div>
 </section>
+<section id="query-expect-error-pattern">
+<h4><code class="docutils literal notranslate"><span class="pre">query</span> 
<span class="pre">expect_error(&lt;pattern&gt;)</span></code><a 
class="headerlink" href="#query-expect-error-pattern" title="Link to this 
heading">#</a></h4>
+<p>Asserts that both Spark and Comet throw an exception containing the given 
pattern. Use this
+for ANSI mode tests where invalid operations should throw errors.</p>
+<div class="highlight-sql notranslate"><div 
class="highlight"><pre><span></span><span class="c1">-- Config: 
spark.sql.ansi.enabled=true</span>
+
+<span class="c1">-- integer overflow should throw in ANSI mode</span>
+<span class="n">query</span><span class="w"> </span><span 
class="n">expect_error</span><span class="p">(</span><span 
class="n">ARITHMETIC_OVERFLOW</span><span class="p">)</span>
+<span class="k">SELECT</span><span class="w"> </span><span 
class="mi">2147483647</span><span class="w"> </span><span 
class="o">+</span><span class="w"> </span><span class="mi">1</span>
+
+<span class="c1">-- division by zero should throw in ANSI mode</span>
+<span class="n">query</span><span class="w"> </span><span 
class="n">expect_error</span><span class="p">(</span><span 
class="n">DIVIDE_BY_ZERO</span><span class="p">)</span>
+<span class="k">SELECT</span><span class="w"> </span><span 
class="mi">1</span><span class="w"> </span><span class="o">/</span><span 
class="w"> </span><span class="mi">0</span>
+
+<span class="c1">-- array out of bounds should throw in ANSI mode</span>
+<span class="n">query</span><span class="w"> </span><span 
class="n">expect_error</span><span class="p">(</span><span 
class="n">INVALID_ARRAY_INDEX</span><span class="p">)</span>
+<span class="k">SELECT</span><span class="w"> </span><span 
class="nb">array</span><span class="p">(</span><span class="mi">1</span><span 
class="p">,</span><span class="w"> </span><span class="mi">2</span><span 
class="p">,</span><span class="w"> </span><span class="mi">3</span><span 
class="p">)[</span><span class="mi">10</span><span class="p">]</span>
+</pre></div>
+</div>
+</section>
 </section>
 </section>
 <section id="adding-a-new-test">
diff --git a/searchindex.js b/searchindex.js
index 4b48432f6..b031fc4f7 100644
--- a/searchindex.js
+++ b/searchindex.js
@@ -1 +1 @@
-Search.setIndex({"alltitles": {"1. Format Your Code": [[12, 
"format-your-code"]], "1. Install Comet": [[21, "install-comet"]], "1. Native 
Operators (nativeExecs map)": [[4, "native-operators-nativeexecs-map"]], "2. 
Build and Verify": [[12, "build-and-verify"]], "2. Clone Spark and Apply Diff": 
[[21, "clone-spark-and-apply-diff"]], "2. Sink Operators (sinks map)": [[4, 
"sink-operators-sinks-map"]], "3. Comet JVM Operators": [[4, 
"comet-jvm-operators"]], "3. Run Clippy (Recommended)": [[12 [...]
\ No newline at end of file
+Search.setIndex({"alltitles": {"1. Format Your Code": [[12, 
"format-your-code"]], "1. Install Comet": [[21, "install-comet"]], "1. Native 
Operators (nativeExecs map)": [[4, "native-operators-nativeexecs-map"]], "2. 
Build and Verify": [[12, "build-and-verify"]], "2. Clone Spark and Apply Diff": 
[[21, "clone-spark-and-apply-diff"]], "2. Sink Operators (sinks map)": [[4, 
"sink-operators-sinks-map"]], "3. Comet JVM Operators": [[4, 
"comet-jvm-operators"]], "3. Run Clippy (Recommended)": [[12 [...]
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to