jubins commented on PR #59094: URL: https://github.com/apache/spark/pull/59094#issuecomment-5899868919
> ## Review summary > The NULL-state handling fixes the reported estimate and combine crashes, but the estimate's early return also bypasses validation of a non-positive `k`, allowing invalid input to succeed silently. The new combine comment overstates aggregate NULL behavior, and the nullability tests do not protect the non-nullable branch of the new metadata contract. These three issues should be addressed before completion. > > ## Findings > **3 total: 0 P0, 0 P1, 1 P2, 2 P3.** > > ### Non-blocking (P2) > * **Validate k before returning for a NULL sketch** — `sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ApproxTopKExpressions.scala:112` — see inline. > > ### Nit (P3) > * **Avoid claiming that all aggregates ignore NULLs** — `sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/ApproxTopKAggregates.scala:909` — see inline. > * **Cover the non-nullable nullability branch** — `sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/ApproxTopKExpressions.scala:135` — see inline. thanks for your review @cloud-fan, all three comments addressed -- 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]
