Skip to content
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

Merged
merged 14 commits into from Mar 2, 2022
Merged

Age load issue #188

merged 14 commits into from Mar 2, 2022

Conversation

muhammadshoaib
Copy link
Contributor

Fixed issue with AGE Load

muhammadshoaib and others added 3 commits February 20, 2022 13:44
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) {
Copy link
Contributor

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) {
Copy link
Contributor

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) {
Copy link
Contributor

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;
Copy link
Contributor

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) {
Copy link
Contributor

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,...)
{


agtype_in_state result;
size_t i;

if (start_index + 1 == fields_len)
if (start_index + 1 == fields_len) {
Copy link
Contributor

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,...)
{

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++) {
Copy link
Contributor

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,...)
{

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) {
Copy link
Contributor

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,...)
{

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) {
Copy link
Contributor

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) {
Copy link
Contributor

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,...)
{

@JoshInnis JoshInnis merged commit ac4c7f9 into apache:master Mar 2, 2022
@muhammadshoaib muhammadshoaib deleted the age_load_issue branch March 23, 2023 10:58
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.

None yet

3 participants