diff --git a/relational/parser.py b/relational/parser.py index 16909af..f748e97 100644 --- a/relational/parser.py +++ b/relational/parser.py @@ -150,7 +150,7 @@ class Node: elif isinstance(self, Binary) and self.name == DIVISION: return list(set(self.left.result_format(rels)) - set(self.right.result_format(rels))) elif self.name == PROJECTION: - return [i.strip() for i in self.prop.split(',')] + return self.get_projection_prop() elif self.name == PRODUCT: return self.left.result_format(rels) + self.right.result_format(rels) elif self.name == SELECTION: @@ -270,8 +270,6 @@ class Unary(Node): self.prop = ','.join(f'{k}{ARROW}{v}' for k, v in renames.items()) - - def parse_tokens(expression: List[Union[list, str]]) -> Node: '''Generates the tree from the tokenized expression If no expression is specified then it will create an empty node'''