--- a/server/rqlannotation.py Fri Feb 14 17:52:49 2014 +0100
+++ b/server/rqlannotation.py Mon Feb 17 11:13:27 2014 +0100
@@ -35,15 +35,6 @@
#if server.DEBUG:
# print '-------- sql annotate', repr(rqlst)
getrschema = annotator.schema.rschema
- need_distinct = rqlst.distinct
- for rel in rqlst.iget_nodes(Relation):
- if getrschema(rel.r_type).symmetric and not isinstance(rel.parent, Exists):
- for vref in rel.iget_nodes(VariableRef):
- stinfo = vref.variable.stinfo
- if not stinfo['constnode'] and stinfo['selected']:
- need_distinct = True
- # XXX could mark as not invariant
- break
for var in rqlst.defined_vars.itervalues():
stinfo = var.stinfo
if stinfo.get('ftirels'):
@@ -130,8 +121,6 @@
# can use N.ecrit_par as principal
if (stinfo['selected'] or len(stinfo['relations']) > 1):
break
- elif rschema.symmetric and stinfo['selected']:
- break
joins.add( (rel, role) )
else:
# if there is at least one ambigous relation and no other to
@@ -160,7 +149,6 @@
for col_alias in rqlst.aliases.itervalues():
if col_alias.stinfo.get('ftirels'):
has_text_query = True
- rqlst.need_distinct = need_distinct
return has_text_query