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 AGENT FIELD GUIDE

Snowflake LAST_VALUE can pull a future reading into a historical report

An explicit frame ending at the current row keeps a forward fill from using observations that come later in the series.

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

A request like “carry the last known reading forward for each device” gives a SQL assistant two jobs: put the observations in order and limit which observations each row can see. In Snowflake, ORDER BY inside LAST_VALUE does the first job, but it does not do the second. The Snowflake reference says that without an explicit frame, LAST_VALUE uses the entire partition, from UNBOUNDED PRECEDING to UNBOUNDED FOLLOWING. A later measurement can therefore appear in a report row for an earlier time.

Run the same fill with two different frames

Consider one device with a reading of 10 at 09:00, a missing reading at 09:05 and a reading of 20 at 09:10. The query below illustrates the two outcomes implied by the documented frame and IGNORE NULLS behavior. The data are synthetic; the outputs are derived from the documentation, not an independent Snowflake run.

WITH readings AS (
  SELECT column1 AS minute_of_day, column2 AS reading
  FROM VALUES (540, 10), (545, NULL), (550, 20)
)
SELECT minute_of_day, reading,
       LAST_VALUE(reading) IGNORE NULLS OVER (
         ORDER BY minute_of_day
       ) AS whole_partition,
       LAST_VALUE(reading) IGNORE NULLS OVER (
         ORDER BY minute_of_day
         ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW
       ) AS known_at_that_row
FROM readings
ORDER BY minute_of_day;

The whole-partition expression yields 20 on all three rows. With a frame ending at the current row, the values are 10, 10 and 20. The distinction is clearest at 09:05: the latest non-null reading in the full series is 20, but the latest non-null reading at that point is 10. IGNORE NULLS skips missing values within the chosen frame; it does not set the frame. Snowflake documents that the default is RESPECT NULLS, so specify IGNORE NULLS when a null means a missing observation rather than a reset.

What to review in generated SQL

For multiple devices, partition by device. If timestamps tie, use a tie-breaker that reflects the intended event order: Snowflake notes that results are fully deterministic only when the window ordering keys make each row unique. A useful regression fixture is a gap followed by a different reading. The historical row should retain its prior value after the later reading is added. If the report is meant to reflect what was actually available at the time and readings can arrive late, check the availability cutoff separately; a frame over event time alone does not express that requirement.

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.