server/rqlannotation.py
changeset 340 bfe0e95571aa
parent 339 c0a0ce6c0428
child 438 69b79faefa94
equal deleted inserted replaced
339:c0a0ce6c0428 340:bfe0e95571aa
    34                     for vref in rel.get_nodes(VariableRef):
    34                     for vref in rel.get_nodes(VariableRef):
    35                         var = vref.variable
    35                         var = vref.variable
    36                         if not var.stinfo['selected'] and len(var.stinfo['possibletypes']) > 1:
    36                         if not var.stinfo['selected'] and len(var.stinfo['possibletypes']) > 1:
    37                             need_intersect = True
    37                             need_intersect = True
    38                             break
    38                             break
    39                     else:
    39                     if rschema.inlined:
    40                         if rschema.inlined:
    40                         try:
    41                             try:
    41                             var = rel.children[1].children[0].variable
    42                                 var = rel.children[1].children[0].variable
    42                         except AttributeError:
    43                             except AttributeError:
    43                             pass # rewritten variable
    44                                 pass # rewritten variable
    44                         else:
    45                             else:
    45                             if not var.stinfo['constnode']:
    46                                 if not var.stinfo['constnode']:
    46                                 need_distinct = True
    47                                     need_distinct = True
       
    48         elif getrschema(rel.r_type).symetric:
    47         elif getrschema(rel.r_type).symetric:
    49             for vref in rel.iget_nodes(VariableRef):
    48             for vref in rel.iget_nodes(VariableRef):
    50                 stinfo = vref.variable.stinfo
    49                 stinfo = vref.variable.stinfo
    51                 if not stinfo['constnode'] and stinfo['selected']:
    50                 if not stinfo['constnode'] and stinfo['selected']:
    52                     need_distinct = True
    51                     need_distinct = True