Skip to content

Conversation

@renewooller
Copy link
Contributor

No description provided.

bulk_insert.py Outdated
return struct.pack(format_str, Type.STRING, encoded_str)

## if it hasn't returned by this point, it is trying to set it to a type that it can't adopt
raise Exception("unable to parse [" + prop_str + "] with type ["+type+"]")
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be better to print type as repr(type) or similar, as non-string values will raise a TypeError here.

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.

This is a great addition! I have two minor requests.

bulk_insert.py Outdated
QUOTING=csv.QUOTE_NONE
try :
FIELD_TYPES = json.loads(field_types)
except: FIELD_TYPES = None
Copy link
Contributor

Choose a reason for hiding this comment

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

I think that failure to parse field_types should cause a printed warning or an exception (no strong preference between the two).

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.

Thanks very much, @renewooller ! This is a fantastic addition.

@jeffreylovitz jeffreylovitz merged commit a83eee5 into RedisGraph:master Aug 21, 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