-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Optimize
replace_params_with_values
(#13308)
* Add benchmark for `with_param_values` Target of this benchmark: control that placeholders replacing does not get slower, if the query does not contain placeholders at all. * Do not save original expression name if it does not contain placeholders Prior this patch, the original expression name was unconditionally preserved during the replacement of placeholders. However, in some cases, this is unnecessary. If the expression does not contain any placeholders, its name remains unchanged, and we do not need to preserve it. This patch adds the following optimization: - If during first pass (placeholders type inference) was investigated that there are no placeholders, do not save the original name, do not apply second pass (replacing). Just leave the expression as it is and return `Transformed::no(...)`.
- Loading branch information
Showing
4 changed files
with
51 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters