Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sql/analyzer: add rule to avoid unnecessary casts #526

Merged
merged 1 commit into from
Nov 5, 2018

Conversation

erizocosmico
Copy link
Contributor

Fixes #502

@erizocosmico erizocosmico requested a review from a team November 2, 2018 09:48
@@ -20,6 +20,7 @@ var DefaultRules = []Rule{
{"move_join_conds_to_filter", moveJoinConditionsToFilter},
{"eval_filter", evalFilter},
{"optimize_distinct", optimizeDistinct},
{"remove_unnecessary_converts", removeUnnecessaryConverts},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you think about moving this rule to OnceAfterDefault? Is it necessary run it several times?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcarmonaa It should be executed several times because the plan will change and could contain new unnecessary casts again.

Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico erizocosmico force-pushed the feature/unnecessary-casts branch from f169c5c to d7e7d21 Compare November 2, 2018 10:58
@ajnavarro ajnavarro merged commit 33153ed into src-d:master Nov 5, 2018
@erizocosmico erizocosmico deleted the feature/unnecessary-casts branch November 5, 2018 08:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants