trino
                                
                                 trino copied to clipboard
                                
                                    trino copied to clipboard
                            
                            
                            
                        Improve comparison predicate pushdown when varchar column cast to date
Such a cast cannot reasonably be pruned away because the source varchar
value can be any of multiple forms (surrounding whitespace, optional
year sign, optional leading zeros for date components). However, a
usefully narrow Domain can be extracted and passed over to connectors
to help connectors prune the data.
Fixes https://github.com/trinodb/trino/issues/12925
Marked draft because
- pending clarification on whether any kind of predicate pushdown is allowed, see https://github.com/trinodb/trino/pull/13605#discussion_r942552662
- the current implementation isn't correct yet
Ready for review now.
Added a test in TestIcebergMetadataFileOperations that shows gains for Iceberg. Gains for JDBC connectors are "obvious".
Gains for JDBC connectors are "obvious".
Out of curiosity: how would we be able to test the gains?
Gains for JDBC connectors are "obvious".
Out of curiosity: how would we be able to test the gains?
We could perhaps check number of input positions (rows) retrieved from the remote database.