vranes commented on code in PR #58853:
URL: https://github.com/apache/spark/pull/58853#discussion_r4049057148
##########
common/utils/src/main/resources/error/error-conditions.json:
##########
@@ -176,7 +176,7 @@
},
"ASOF_JOIN_MATCH_CONDITION_TABLE_REFERENCE" : {
"message" : [
- "Each operand of the MATCH_CONDITION comparison must reference only
columns of one join input. Got: <refs1> and <refs2>."
+ "Each operand of the MATCH_CONDITION comparison must reference exactly
one join input, and the two operands must reference different inputs. Got:
<refs1> and <refs2>."
Review Comment:
Optional nit: operand1 and operand2 is more accurate, since these can be
literals too.
##########
sql/core/src/test/resources/sql-tests/inputs/join-asof-expressions.sql:
##########
@@ -68,23 +68,8 @@ SELECT * FROM trades t ASOF JOIN quotes q
MATCH_CONDITION (jitter_ts(t.trade_time) >= q.quote_time)
ON t.symbol = q.symbol;
--- FVT-ASOF-8-008: CURRENT_TIMESTAMP in MATCH_CONDITION operand
(query-foldable constant)
-SELECT count(*) AS cnt
-FROM trades t ASOF JOIN quotes q
- MATCH_CONDITION (current_timestamp() >= q.quote_time)
- ON t.symbol = q.symbol;
-
--- FVT-ASOF-8-008a: literal constant in MATCH_CONDITION operand (right)
-SELECT count(*) AS cnt
-FROM trades t ASOF JOIN quotes q
- MATCH_CONDITION (t.trade_time >= TIMESTAMP '2026-06-29 10:00:00')
- ON t.symbol = q.symbol;
-
--- FVT-ASOF-8-008b: literal constant in MATCH_CONDITION operand (left)
-SELECT count(*) AS cnt
-FROM trades t ASOF JOIN quotes q
- MATCH_CONDITION (TIMESTAMP '2026-06-29 10:00:00' >= q.quote_time)
- ON t.symbol = q.symbol;
+-- FVT-ASOF-8-008: constant MATCH_CONDITION operand (literal or
query-foldable) is rejected;
Review Comment:
nit: either remove this or simplify it
```suggestion
-- FVT-ASOF-8-008: constant MATCH_CONDITION operand, covered by
FVT-ASOF-3-024..027 in join-asof-errors.sql
```
--
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]