-
Notifications
You must be signed in to change notification settings - Fork 421
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
Age load issue #188
Age load issue #188
Conversation
ce2c4c8
to
6cfd669
Compare
fixed regression test issue
Refactored the agtype_access_operator and support functions to eliminate the constant conversions back-and-forth. Also corrected the response to AGTV_NULL Moved get_agtype_key from age_vle.c to agtype.c for usage by others. Adjusted 2 regression tests.
@@ -44,7 +44,8 @@ void edge_field_cb(void *field, size_t field_len, void *data) { | |||
if (cr->fields == NULL) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function(blah blah,...)
{
@@ -171,8 +174,10 @@ int create_edges_from_csv_file(char *file_path, | |||
cr.object_id = object_id; | |||
|
|||
while ((bytes_read=fread(buf, 1, 1024, fp)) > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
if (csv_parse(&p, buf, bytes_read, edge_field_cb, edge_row_cb, &cr) != bytes_read) { | ||
ereport(ERROR, (errmsg("Error while parsing file: %s\n", csv_strerror(csv_error(&p))))); | ||
if (csv_parse(&p, buf, bytes_read, edge_field_cb, | ||
edge_row_cb, &cr) != bytes_read) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
@@ -81,7 +81,8 @@ void vertex_field_cb(void *field, size_t field_len, void *data) { | |||
if (cr->fields == NULL) { | |||
cr->error = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
@@ -199,15 +202,18 @@ int create_labels_from_csv_file(char *file_path, | |||
|
|||
|
|||
while ((bytes_read=fread(buf, 1, 1024, fp)) > 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
src/backend/utils/load/age_load.c
Outdated
|
||
agtype_in_state result; | ||
size_t i; | ||
|
||
if (start_index + 1 == fields_len) | ||
if (start_index + 1 == fields_len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
src/backend/utils/load/age_load.c
Outdated
memset(&result, 0, sizeof(agtype_in_state)); | ||
|
||
result.res = push_agtype_value(&result.parse_state, WAGT_BEGIN_OBJECT, NULL); | ||
result.res = push_agtype_value(&result.parse_state, | ||
WAGT_BEGIN_OBJECT, NULL); | ||
|
||
for (i = start_index; i<fields_len; i++) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
src/backend/utils/load/age_load.c
Outdated
void insert_edge_simple(Oid graph_id, char* label_name, graphid edge_id, graphid start_id, graphid end_id, agtype* edge_properties) { | ||
void insert_edge_simple(Oid graph_id, char* label_name, graphid edge_id, | ||
graphid start_id, graphid end_id, | ||
agtype* edge_properties) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
src/backend/utils/load/age_load.c
Outdated
void insert_vertex_simple(Oid graph_id, char* label_name, graphid vertex_id, agtype* vertex_properties) { | ||
void insert_vertex_simple(Oid graph_id, char* label_name, | ||
graphid vertex_id, | ||
agtype* vertex_properties) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
if (csv_parse(&p, buf, bytes_read, vertex_field_cb, vertex_row_cb, &cr) != bytes_read) { | ||
ereport(ERROR, (errmsg("Error while parsing file: %s\n", csv_strerror(csv_error(&p))))); | ||
if (csv_parse(&p, buf, bytes_read, vertex_field_cb, | ||
vertex_row_cb, &cr) != bytes_read) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brace needs to be on its own line -
some_function_or_command(blah blah,...)
{
fixed regression test issue
Fixed issue with AGE Load