Commit Graph

3 Commits

Author SHA1 Message Date
Han Fei
ca6930eb11
Revert "Revert "Merge pull request #50951 from ZhiguoZh/20230607-toyear-fix"" 2023-07-04 17:38:53 +02:00
Alexey Milovidov
477b707ff1 Revert "Merge pull request #50951 from ZhiguoZh/20230607-toyear-fix"
This reverts commit 6bbd0d144d, reversing
changes made to 74cb79769b.
2023-06-26 02:02:24 +02:00
Zhiguo Zhou
d14299eb09 The general optimization of predicates with date/datetime converters
As is suggested in issue #15257, the function preimage is a general
solution to the optimization problem with predicates containing the
date and datetime converters. This commit implements the idea by
adding the new methods, hasInformationAboutPreimage and getPreimage,
to IFunction/IFunctionBase, and having the specific convert functions
define their own preimage. Moreover, we added a new pass in the
TreeOptimizer and a new AST visitor for in-place rewriting the AST
with the converters' preimage.

Specifically, the optimization is applied to toYear and toYYYYMM.
2023-06-15 21:48:02 +08:00