live wire
▸EKOS submits 70.15% on BIRD’s hidden test and 88.33% on Mini-Dev with different Claude models; both entries are pendingBIRD submission PR #270▸MotherDuck rolls out DuckDB 2.0 with async I/O and reports faster cold reads in TPC-H and TPC-DS testsMotherDuck▸ThoughtSpot Spotter starts rolling out answer explanations for token-based results, not AgentQLThoughtSpot▸Snowflake previews Z.ai GLM 5.4 in Cortex Inference, but not in Cortex AgentsSnowflake release notes▸Removing Vietnamese diacritics cut text-to-SQL accuracy by 10.3–37.0 points across four models in an author studyLe Trung et al., Vietnamese MultiSpider artifacts▸Avelis 1.7 adds AI-built dashboards and reruns pinned exploratory SQL under each viewer’s permissionsAvelis release notes▸Aurora MySQL previews cluster groups with one routing endpoint; each query still runs on one clusterAWS What's New▸Rewind-HNSW uses 86.9% less memory than full snapshots in authors’ 20-version testsShea et al., Rewind-HNSW §5.5▸Snowflake previews pausing downstream dynamic table refreshes when data quality checks failSnowflake release notes▸BigQuery previews optional GoogleSQL optimization suggestions in its interactive SQL translatorGoogle Cloud documentation▸Snowflake extends its Tableau and Power BI dashboard migration preview to Azure deploymentsSnowflake release notes▸Google Cloud makes it generally available to unpublish Iceberg data shares from SAP Business Data CloudGoogle Cloud — BigQuery and Lakehouse documentation▸AWS previews organization-wide cost questions in Ops Agent for FinOpsAWS What's New▸Looker updates require API login credentials in the request body, not the URLGoogle Cloud — Looker documentation▸EKOS submits 70.15% on BIRD’s hidden test and 88.33% on Mini-Dev with different Claude models; both entries are pendingBIRD submission PR #270▸MotherDuck rolls out DuckDB 2.0 with async I/O and reports faster cold reads in TPC-H and TPC-DS testsMotherDuck▸ThoughtSpot Spotter starts rolling out answer explanations for token-based results, not AgentQLThoughtSpot▸Snowflake previews Z.ai GLM 5.4 in Cortex Inference, but not in Cortex AgentsSnowflake release notes▸Removing Vietnamese diacritics cut text-to-SQL accuracy by 10.3–37.0 points across four models in an author studyLe Trung et al., Vietnamese MultiSpider artifacts▸Avelis 1.7 adds AI-built dashboards and reruns pinned exploratory SQL under each viewer’s permissionsAvelis release notes▸Aurora MySQL previews cluster groups with one routing endpoint; each query still runs on one clusterAWS What's New▸Rewind-HNSW uses 86.9% less memory than full snapshots in authors’ 20-version testsShea et al., Rewind-HNSW §5.5▸Snowflake previews pausing downstream dynamic table refreshes when data quality checks failSnowflake release notes▸BigQuery previews optional GoogleSQL optimization suggestions in its interactive SQL translatorGoogle Cloud documentation▸Snowflake extends its Tableau and Power BI dashboard migration preview to Azure deploymentsSnowflake release notes▸Google Cloud makes it generally available to unpublish Iceberg data shares from SAP Business Data CloudGoogle Cloud — BigQuery and Lakehouse documentation▸AWS previews organization-wide cost questions in Ops Agent for FinOpsAWS What's New▸Looker updates require API login credentials in the request body, not the URLGoogle Cloud — Looker documentation
nl2sql.ai
guideSQL CORRECTNESS

DuckDB can tell a failed run with no error message from an unknown outcome

If run outcomes are stored as a tagged UNION, count the failure tag rather than the error text. A four-row test shows why the two counts differ.

By The News Desk· Nov 30, 2026the quick take — two AI hosts go live when you do

When a query agent is asked how many jobs failed, counting the error messages can give the wrong answer. In DuckDB, a column of the tagged UNION type can record a failed outcome even when its error message is NULL. The tag tells you the outcome; the value inside it tells you what was recorded about that outcome. This is a data type, not the SQL UNION operator.

The two counts answer different questions

DuckDB’s union_extract returns NULL if the requested member isn’t selected. It also gives you NULL if that member is selected but its payload is null. So extracting failed and looking only at the resulting strings cannot distinguish a success from a failure with no error text. union_tag reads the selected member instead.

Here is a four-row example run by the desk in DuckDB 2.0.0. The rows represent a failure with a message, a failure without one, a success, and a missing outcome:

WITH runs(outcome) AS (
  VALUES
    (CAST(union_value(failed := 'timeout') AS UNION(ok VARCHAR, failed VARCHAR))),
    (CAST(union_value(failed := NULL::VARCHAR) AS UNION(ok VARCHAR, failed VARCHAR))),
    (CAST(union_value(ok := 'done') AS UNION(ok VARCHAR, failed VARCHAR))),
    (NULL::UNION(ok VARCHAR, failed VARCHAR))
)
SELECT count(*) AS runs,
       count(union_extract(outcome, 'failed')) AS with_error_text,
       count(*) FILTER (WHERE union_tag(outcome) = 'failed') AS failed_runs,
       count(*) FILTER (WHERE outcome IS NULL) AS unknown_outcomes
FROM runs;
RunsWith error textFailed runsUnknown outcomes
4121

Give the metric a test that distinguishes the two

If a semantic model or SQL agent exposes both measures, label them separately: failed runs for the tag count and failures with error text for the payload count. In a regression test, include at least one failure with a null payload and one entirely null outcome. A fixture where every failure has a message would let the wrong query pass. Apply the same distinction to a failure-rate denominator: decide whether unknown outcomes belong in it, rather than treating them as successes by default.

Filed by The News Desk. Corrections: desk@nl2sql.ai · Our standards →

comments · 0

    Comments are moderated before they appear. Your email is used once to confirm it is you — never shown, never sold. Corrections and questions get an answer from the desk when we have one.