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

   Thank you for the review, @dongjoon-hyun. 3f7f56e addresses it:
   
   1. **The path of a domain** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193755)): 
the header, the guide and the scaladocs say "the schema that create_reader 
got". The header and the guide also say that the schema to read of `read` may 
have fewer columns, at other indices.
   2. **Long chains of conjuncts** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193765)): 
the constraints are intersected as a balanced tree, and a chain of ANDs is 
walked without recursion. A new test covers 50,000 `id <> v` in four forms (as 
predicates, as one chain, as `NOT` of a chain of ORs, under an OR), in about 
0.75 s.
   3. **No domains for a library without push_domains** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193788)): 
the new `ColumnarDataSource.supportsDomainPushdown()` (false by default; 
`NativeDataSource` uses `hasFunction(PUSH_DOMAINS)`) gates the derivation and 
the creation of the planner. Tests check that optimizing such a query creates 
no reader, natively and with a JVM data source.
   4. **AND and OR without two predicates** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193798)): 
they constrain no column, with a test.
   5. **Pushing the predicates once** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193817)): 
a second push is an internal error, with a test.
   6. **Cleanup of the exported ranges** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193830)): 
each allocation is registered for cleanup right after it is made.
   7. **Domains only for the constrained columns** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193844)): 
the guide says so.
   8. **One case for AND and OR** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193855)).
   9. **`ColumnDomains` keeps its predicates** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193869)).
   10. **`NormalizeFloatingNumbers`** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193877)).
   11. **`ordering` as a lazy val** 
([thread](https://github.com/apache/spark/pull/59929#discussion_r4515193887)).
   
   Each new test fails with its fix reverted: the long chains time out with the 
constraints folded one after the other (4 minutes with the fold, against 20 
seconds), the malformed AND or OR overflows the stack without the guard, and 
the second push and the creation of a planner for a data source that takes no 
domain are not caught without the check and the gate.
   
   ColumnDomainsSuite, ColumnarDataSourceSuite and NativeDataSourceSuite pass 
locally (127 tests, with the Java 25 test JVM for the native ones).


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