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 PRACTICE

Snowflake ARRAY_SLICE can leave the newest event out of a recent-events report

A negative end index counts backward, but the endpoint is still excluded. Use the array length when the last element belongs in the result.

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

“Show the last three events, including the newest” sounds like a straightforward slice of an event array. In Snowflake, though, -1 as the end index means stop before the last element, not “go through the end.” If the array is ordered oldest to newest, the resulting report can look plausible while leaving out the very event the reader asked to see. Snowflake’s ARRAY_SLICE reference documents both rules: negative indexes count back from the end, and the to position is always excluded.

What the endpoint changes

Consider a dashboard backed by an array of deployment events, already ordered from oldest to newest. The newest event is a rollback. This illustrative query was not run against a live Snowflake account; the expected results follow from the documented indexing rules.

WITH example AS (
  SELECT ['queued', 'built', 'deployed', 'rolled back'] AS events
)
SELECT
  ARRAY_SLICE(events, -3, -1) AS stops_before_latest,
  ARRAY_SLICE(events, -3, ARRAY_SIZE(events)) AS includes_latest
FROM example;
ExpressionExpected result
ARRAY_SLICE(events, -3, -1)['built', 'deployed']
ARRAY_SLICE(events, -3, ARRAY_SIZE(events))['built', 'deployed', 'rolled back']

In the first expression, -3 points to built and -1 points to rolled back. Snowflake includes the start but excludes the end, so that expression answers a different question: which events fall between those positions, stopping before the newest? In the second, the end index is four, one past the last valid index of this four-element array. Snowflake’s reference uses the same ARRAY_SIZE pattern in its example of slicing through the final item.

What to check in generated SQL

Make the input order part of the report contract. “Last” means last in the array, so the query above only means “latest” if the array is already in chronological order. Then test with a fixture where the final event changes the interpretation: a rollback after a successful deployment makes an omitted endpoint much easier to spot than three interchangeable success events. If the request actually says “before the latest event,” the exclusive -1 endpoint is useful. The two prompts should not produce the same slice.

sources

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.