HeartSaVioR commented on PR #60198: URL: https://github.com/apache/spark/pull/60198#issuecomment-6758519302
> [!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 [AI review](https://github.com/apache/spark/pull/60198#pullrequestreview-5831792414) of 932751cd119. Every finding is addressed in [0c20a33fc99](https://github.com/apache/spark/commit/0c20a33fc9915847ea1418b0f9195b0dcc7a3b9a): - **`hasStreamSideLookupKey` counts comparisons that are never offered.** It's gone (see viirya's thread). - **A key written only in WHERE works only with an ON condition.** An inner lookup join whose key comes only from WHERE now plans in both forms, `FROM s, t WHERE s.id = t.id` and `JOIN ... ON TRUE WHERE ...`, as for an ordinary join. A join that still has no condition after pushdown fails with `MISSING_JOIN_CONDITION`, whose message now says that a key can come from WHERE. - **Where should constants that a connector needs as its key go?** Your third option. Constant comparisons move onto the lookup side exactly as for an ordinary join, and `PrepareExternalLookupJoin` both pushes them as filters and offers them as key candidates. A range with a constant bound keeps requests batched and cached. Tests use `CompositeExternalLookupDataSource` with a constant tenant, and each such query also plans, with the same rows, with the pushdown rules excluded. - **The description suggestion** is applied: the description says that excluding `PushDownPredicates` can make a query fail to plan when its only key is written in WHERE. -- 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]
