fixed problem with select and renames when using fields
git-svn-id: http://galileo.dmi.unict.it/svn/relational/trunk@171 014f5005-505e-4b48-8d0a-63407b615a7c
This commit is contained in:
parent
77c6cec3e9
commit
17080aa381
@ -213,7 +213,6 @@ def swap_rename_select(n):
|
||||
them with ρ j(σ k(R)). Renaming the attributes used in the
|
||||
selection, so the operation is still valid.'''
|
||||
#TODO document into the wiki
|
||||
#FIXME selection of date.day won't work.
|
||||
changes=0
|
||||
|
||||
if n.name=='σ' and n.child.name=='ρ':
|
||||
@ -229,8 +228,12 @@ def swap_rename_select(n):
|
||||
|
||||
#Renaming stuff
|
||||
for i in range(len(_tokens)):
|
||||
if _tokens[i] in _vars:
|
||||
_tokens[i]=_vars[_tokens[i]]
|
||||
splitted=_tokens[i].split('.',1)
|
||||
if splitted[0] in _vars:
|
||||
if len(splitted)==1:
|
||||
_tokens[i]=_vars[_tokens[i].split('.')[0]]
|
||||
else:
|
||||
_tokens[i]=_vars[_tokens[i].split('.')[0]]+'.'+splitted[1]
|
||||
|
||||
#Swapping operators
|
||||
n.name='ρ'
|
||||
|
Loading…
Reference in New Issue
Block a user