From 67d050e07de168c64640d03892edd0fe26145d18 Mon Sep 17 00:00:00 2001 From: Salvo 'LtWorf' Tomaselli Date: Tue, 9 Jun 2020 19:34:26 +0200 Subject: [PATCH] Execute context optimizations --- relational/optimizer.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/relational/optimizer.py b/relational/optimizer.py index 30c24bd..7ff62b1 100644 --- a/relational/optimizer.py +++ b/relational/optimizer.py @@ -82,10 +82,10 @@ def optimize_all(expression: Union[str, Node], rels: ContextDict, specific: bool total = 0 if specific: for i in optimizations.specific_optimizations: - res = i(n, rels) # Performs the optimization - if res != 0 and dbg: + n, c = recursive_scan(i, n, rels) + if c != 0 and dbg: debug.append(str(n)) - total += res + total += c if general: for i in optimizations.general_optimizations: n, c = recursive_scan(i, n, None)