HyukjinKwon commented on PR #60129:
URL: https://github.com/apache/spark/pull/60129#issuecomment-6714059290

   Thank you for the twelfth round, @dongjoon-hyun. 9a090d6 addresses it:
   
   - **The per-batch check** 
([66](https://github.com/apache/spark/pull/60129#discussion_r4503975235), 
[67](https://github.com/apache/spark/pull/60129#discussion_r4503975239)):
     - `impliedBy` now leaves the values to the optimizer: it optimizes the 
pushed filter with the equalities of its columns, so `ConstantPropagation` 
keeps the columns of an expression that may fail as in the micro-batch.
     - A filter whose columns all have values is evaluated directly.
     - The floating zeros are still tried both ways.
     - `Reads.filters` now tells 0.0 from -0.0 as the check does.
   - **Performance** 
([68](https://github.com/apache/spark/pull/60129#discussion_r4503975241), 
[69](https://github.com/apache/spark/pull/60129#discussion_r4503975242)): 
`current_time()`-like values no longer run the optimizer, and a condition goes 
through a projection only if `CollapseProject` would inline its aliases.
   - **Pushdown** 
([70](https://github.com/apache/spark/pull/60129#discussion_r4503975245)): V2 
and Catalyst builders also get the filters that pass 
`ExprUtils.canEvaluateUnconditionally`, after the leading ones, as the Javadoc 
now says.
   - **Tests** (71-74): the test of the check now builds its micro-batch plans 
with the optimizer, including a partial rewrite and a division by zero. The 
filters-evaluated-once tests assert their pushed filters, one test pins the 
default of `failOnOptimizationError`, and the RealTime suite runs a query with 
filters.
   - **Docs, errors and cleanup** (75-80): the order of the fallback, the 
comments on the order of the filters, `toSQLExpr` in the error, the simplified 
`scanWith` and `hasExactEquality`, and the test helpers and tables.
   
   Tests: the seven suites (309 tests, including 
`PythonStreamingDataSourceSuite` and `QueryExecutionErrorsSuite`) and 
scalastyle pass locally, and the test of item 67 fails without its fix.
   


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