From 973f11f1e07d361b82b974308c48b8fa726129a2 Mon Sep 17 00:00:00 2001 From: LtWorf Date: Mon, 4 Oct 2010 09:33:51 +0000 Subject: [PATCH] - Added doc on function signature git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@253 014f5005-505e-4b48-8d0a-63407b615a7c --- relational/optimizer.py | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/relational/optimizer.py b/relational/optimizer.py index 825f84d..57e63b1 100644 --- a/relational/optimizer.py +++ b/relational/optimizer.py @@ -38,7 +38,12 @@ tree=parser.tree #End of the stuff def optimize_all(expression,rels): - '''This function performs all the available optimizations''' + '''This function performs all the available optimizations + + Expression is the UTF-8 encoded string containing the expression to optimize + rels is a dictionary like {'name':relation} + + Return value: this will return an optimized version of the expression''' n=tree(expression) #Gets the tree total=1 while total!=0: @@ -52,7 +57,12 @@ def optimize_all(expression,rels): def specific_optimize(expression,rels): '''This function performs specific optimizations. Means that it will need to - know the fields used by the relations''' + know the fields used by the relations + + Expression is the UTF-8 encoded string containing the expression to optimize + rels is a dictionary like {'name':relation} + + Return value: this will return an optimized version of the expression''' n=tree(expression) #Gets the tree total=1 while total!=0: @@ -63,7 +73,11 @@ def specific_optimize(expression,rels): def general_optimize(expression): '''This function performs general optimizations. Means that it will not need to - know the fields used by the relations''' + know the fields used by the relations + + Expression is the UTF-8 encoded string containing the expression to optimize + + Return value: this will return an optimized version of the expression''' n=tree(expression) #Gets the tree total=1 while total!=0: