Support TopN pushdown for text types in PostgreSQL#7494
Support TopN pushdown for text types in PostgreSQL#7494findepi merged 1 commit intotrinodb:masterfrom
Conversation
|
I still need to figure out where the predicate pushdown queries get generated so that I can provide an explicit collation there. |
4c389fc to
487c6bc
Compare
|
I'm splitting this into multiple PRs to keep scope under control. This PR just enables TopN pushdown for textual types in Postgres connector. I've created an issue #7496 to track this for other connectors and other operations (e.g. predicate pushdown, aggregation pushdown). |
487c6bc to
313e2d1
Compare
313e2d1 to
e5998e4
Compare
There was a problem hiding this comment.
((Function<String, String>) this::quoted).apply( :)
There was a problem hiding this comment.
you can remove OFFSET 0 ROWS now (it was needed for SQL Server)
or even switch back to simpler ORDER BY ... LIMIT ....
There was a problem hiding this comment.
Or we may want to model this as we did with Joins?
see SUPPORTS_JOIN_PUSHDOWN_WITH_VARCHAR_*EQUALITY
There was a problem hiding this comment.
If we can figure out a theoretical solution to allow connectors to participate in predicate pushdown query building I'd keep the override - too many similar enums will confuse implementers (and reviewers) and will make it more work to cleanup in future.
If we don't have a way to also fix predicate pushdown similar to how I fixed topn here then I'll add those new enums as you suggested.
There was a problem hiding this comment.
i don't have a short-term goal to make QueryBuilder more elastic, so it seems it's eiehter "too many enum options" or "a test override" for interim... of the two, it seems "too many enum options" is easier to maintain (and we already have the case with joins)
There was a problem hiding this comment.
picking the default value for the new option is key here -- if you do this right, only PostgreSQL tests will care about the change.
|
@findepi AC as fixups (will squash after review). PTAL. |
There was a problem hiding this comment.
I don't believe this will ever be done for all the connectors, so you can remove the TODO from here.
(add some info in the issue though)
There was a problem hiding this comment.
this should default on a conjunction of SUPPORTS_TOPN_PUSHDOWN and SUPPORTS_PREDICATE_PUSHDOWN_WITH_VARCHAR_INEQUALITY
b035d4b to
1d7f131
Compare
This adds support for pushdown of text types to PostgreSQL by providing an explicit collation for textual columns in the generated SQL.
See also #7177 and #7022.