Closed findepi closed 1 year ago
cc @huberty89 @kokosing @martint
Is this only information_schema
specific? It sounds like it could be a generic optimization. Does %
match an empty string too?
yes, the optimization should be generic. i mentioned information_schema
and system.jdbc
to emphasize importance of such optimization. In these places, today we take different, less optimal code path when LIKE '%'
predicate is present.
I am interested in this part, Could you guide me on how to start on this part?
I am under impression that this rewrite could be handled by io.trino.sql.planner.iterative.rule.SimplifyExpressions
@kokosing Thank you
information_schema
andsystem.jdbc
queries would benefit if we simplifiedtable_name LIKE '%'
(andtable_name LIKE '%%'
etc.) queries totable_name IS NOT NULL
.