Skip to content

Fix test failures #48

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions redisgraph_bulk_loader/relation_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ class RelationType(EntityFile):
def __init__(self, query_buffer, infile, type_str, config):
super(RelationType, self).__init__(infile, type_str, config)
self.query_buffer = query_buffer
self.start_namespace = None
self.end_namespace = None

def process_schemaless_header(self, header):
if self.column_count < 2:
Expand All @@ -37,6 +35,8 @@ def post_process_header_with_schema(self, header):

self.start_id = self.types.index(Type.START_ID)
self.end_id = self.types.index(Type.END_ID)
self.start_namespace = None
self.end_namespace = None
# Capture namespaces of start and end IDs if provided
start_match = re.search(r"\((\w+)\)", header[self.start_id])
if start_match:
Expand Down
4 changes: 2 additions & 2 deletions test/test_bulk_loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -583,8 +583,8 @@ def test13_id_namespaces(self):
graph = Graph(graphname, self.redis_con)
query_result = graph.query('MATCH (src)-[]->(dest) RETURN src.id, src.name, LABELS(src), dest.id, dest.views, LABELS(dest) ORDER BY src.id')

expected_result = [[0, 'Jeffrey', 'User', 0, 20, 'Post'],
[1, 'Filipe', 'User', 1, 40, 'Post']]
expected_result = [['0', 'Jeffrey', 'User', '0', 20, 'Post'],
['1', 'Filipe', 'User', '1', 40, 'Post']]
self.assertEqual(query_result.result_set, expected_result)

def test14_array_properties_inferred(self):
Expand Down