srielau commented on code in PR #57306:
URL: https://github.com/apache/spark/pull/57306#discussion_r3622994657


##########
sql/core/src/test/resources/sql-tests/inputs/join-asof-containers.sql:
##########
@@ -0,0 +1,186 @@
+-- FVT Category 7: ASOF JOIN container integration (FVT-ASOF-7-*)
+-- Source: sql-fvt-plan/plans/asof-join.md
+
+--SET spark.sql.join.asofJoin.enabled=true
+
+CREATE OR REPLACE TEMP VIEW trades(trade_time, symbol, quantity) AS
+  VALUES (TIMESTAMP '2026-06-29 10:00:05', 'AAPL', 100),
+         (TIMESTAMP '2026-06-29 10:00:11', 'AAPL', 200),
+         (TIMESTAMP '2026-06-29 10:00:12', 'MSFT',  50),
+         (TIMESTAMP '2026-06-29 09:59:59', 'GOOG',  30);
+
+CREATE OR REPLACE TEMP VIEW quotes(quote_time, symbol, bid_price) AS
+  VALUES (TIMESTAMP '2026-06-29 10:00:00', 'AAPL', 180.10),
+         (TIMESTAMP '2026-06-29 10:00:07', 'AAPL', 180.15),
+         (TIMESTAMP '2026-06-29 10:00:10', 'AAPL', 180.20),
+         (TIMESTAMP '2026-06-29 10:00:08', 'MSFT', 420.50);
+
+-- FVT-ASOF-7-001: temp view hosting ASOF
+CREATE OR REPLACE TEMP VIEW asof_matched_v AS
+SELECT t.trade_time, q.bid_price
+FROM trades t ASOF JOIN quotes q
+  MATCH_CONDITION (t.trade_time >= q.quote_time)
+  ON t.symbol = q.symbol;
+
+SELECT count(*) AS cnt FROM asof_matched_v;
+
+-- FVT-ASOF-7-002: permanent view hosting ASOF

Review Comment:
   Good catch — fixed in fa39d17. FVT-ASOF-7-002/7-006/7-007 now materialize 
`asof_perm_trades` / `asof_perm_quotes` as permanent Parquet tables (from the 
session temp `trades`/`quotes` views) before defining the permanent view, SQL 
UDF, and table function. Goldens regenerated: those cases now exercise ASOF 
inside the container (e.g. `SELECT count(*) FROM asof_perm_v` → 3) instead of 
`INVALID_TEMP_OBJ_REFERENCE`.
   
   ---
   <!-- GITHUB_MCP_FOOTER: This attribution is automatically appended by GitHub 
MCP. -->
   _This comment was generated with [GitHub MCP](http://go/mcps)._



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to