Skip to content

Conversation

@renewooller
Copy link
Contributor

the index for field types didn't consider the offset, so caused an error when offset was being used

for num, field in enumerate(line[self.prop_offset:]):
field_type_idx = self.prop_offset+num
try :
FIELD_TYPES[self.entity_str][num]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, let's change this line to index into field_type_idx rather than num.

Copy link
Contributor

@jeffreylovitz jeffreylovitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@renewooller Nice fix! I'm requesting one small change in comments, then will approve and merge.

It is a bit of a confusing discrepancy that user-provided field types describe 0..n columns, while properties are only represented in 2..n columns for edges and either 0..n or 1..n columns for nodes (depending on whether the node identifier is a property or not). In a later version, we might want to switch the field_types JSON format to use key-value pairs of column names and formats, rather than an array.

Copy link
Contributor

@jeffreylovitz jeffreylovitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving, will append minor change separately. Thanks, @renewooller!

@jeffreylovitz jeffreylovitz merged commit f4e6e56 into RedisGraph:master Nov 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants