HeartSaVioR commented on PR #60198:
URL: https://github.com/apache/spark/pull/60198#issuecomment-6721036318

   > [!NOTE]
   > **DISCLAIMER:** This comment was written by an LLM, Claude Opus 5.5 
(`claude-opus-5-5`, 1M context), posting on behalf of @HeartSaVioR.
   
   Answers to the two design questions. The guiding rule for this feature is to 
behave as a join does today, except where an external lookup makes that 
impossible. The design document linked in the description explains the 
decisions; the IDs below refer to it.
   - **Conditions that can fail under ANSI mode (O2).** We keep ordinary-join 
parity. An ordinary join pushes the same conjunct and fails the same way, so 
the lookup join does too. The description now says that query results are the 
same as for an ordinary join. A new test pins both cases: an inner join fails 
with `CAST_INVALID_INPUT`, as an ordinary join does, and a left outer join, 
where the conjunct stays in the condition, returns the same rows. The lookup 
join is stricter only where a lookup forces earlier evaluation: range 
parameters (K2) and the operator's early stream-side check (E3).
   - **WHERE-clause comparisons as access paths (O3).** A comparison of a 
lookup column with a constant, such as `customers.tier >= 2`, now moves onto 
the lookup side as a filter, as an ordinary join pushes it into its static 
side. The connector receives it as a pushed filter before it selects its lookup 
predicates, so batching and the cache stay. It stays as a key only when the 
condition has no comparison with a stream-side value that can be a key. A 
comparison over both sides from a WHERE clause, such as `rates.valid_from <= 
events.ts`, still moves into an inner join's condition, as for an ordinary 
join. When the connector selects it as a range key, each request holds one 
parameter row, exactly as for the same comparison written in the ON clause. A 
new end-to-end test checks that `t.id = s.id AND t.id >= 2` keeps batching and 
the cache.


-- 
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