HeartSaVioR commented on PR #59910: URL: https://github.com/apache/spark/pull/59910#issuecomment-6727354034
> [!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 this review. The fixes are in [d16a7ef0e30](https://github.com/apache/spark/commit/d16a7ef0e30c3297a55e1895c7c2746b95e2b659), and in [2b3a34f2eda](https://github.com/apache/spark/commit/2b3a34f2eda1bcbebcbd19247e57674edc5044ad) where #59909 owns the code. - **The command walk visits subqueries twice.** Fixed. The walk visits a node's inner children, then only the subqueries that are not among them. A new test with ten levels of nested IN subqueries visits the innermost plan once. The write tests still pass, including a lookup-only read inside a subquery of a command. - **The task-end close windows.** Fixed with the protocol you proposed. Once the consuming thread has seen the close, it no longer closes the cursor or reads metrics; the close does both, cursor first. Before Spark copies a value row, it marks the copy and checks for the close again, and the reader's close waits for a marked copy to end. The wait covers only that copy, never a connector call, and the close takes no lock. The reader and cursor Javadoc now list exactly what may overlap or follow the close. New tests cover a close while the consumer is inside `next()` or `get()`, and a close while Spark copies a row. - **Null results from four connector methods.** Fixed in [2b3a34f2eda](https://github.com/apache/spark/commit/2b3a34f2eda1bcbebcbd19247e57674edc5044ad), with `NULL_SCAN`, `NULL_READ_SCHEMA`, `NULL_EXTERNAL_LOOKUP` and `NULL_READER_FACTORY`. Each names the table and the method, and each has a test. - **The `maxBatchBytes` documentation.** It now describes the size at which a request stops taking rows, and says that the row that reaches it stays in the request. - **Row reuse and key types.** Added a fixture whose cursor reuses one value row and its STRING and BINARY buffers across `next()`, with several matches per key. Also added executed joins on BIGINT, SMALLINT, TINYINT, BOOLEAN, DECIMAL, DATE, TIMESTAMP, TIMESTAMP_NTZ and BINARY keys. - **The `requiredLookupOutput` documentation.** Fixed in [2b3a34f2eda](https://github.com/apache/spark/commit/2b3a34f2eda1bcbebcbd19247e57674edc5044ad). - **Question 1, wrapped lookup sides.** The interim behavior is intended. Aliases, views, the hint, and SQL and catalog references arrive in #60019, and lookup-side projections and filters in #60055, as the Scope section in the description lists. Until then, such a query fails at its first micro-batch with the batch-scan error, and never gives a wrong result. A command fails during analysis. - **Question 2, the size estimate.** The prepared lookup join now reports the same estimate as the unprepared one, as an ordinary join's statistics would. For inner and left outer joins, that is the stream side's size times `spark.sql.defaultSizeInBytes`. From #60055, semi and anti joins report the stream side's size. This is in [2b3a34f2eda](https://github.com/apache/spark/commit/2b3a34f2eda1bcbebcbd19247e57674edc5044ad), where the node is defined, with a test. -- 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]
