age icon indicating copy to clipboard operation
age copied to clipboard

[Graph Generation Algorithms] Refactor graph_generation.c file

Open markgomer opened this issue 1 year ago • 3 comments

These changes refactor the graph_generation.c file, breaking down create_complete_graph and age_create_barbell_graph into several helper functions. This may make the code more readable and easier to make another pre-modeled graph generation functions. This also add more regress tests for these functions. This also fixes the bug described on #866

Regress tests are OK on PG15:

echo "+++ regress install-check in  +++" && /usr/local/pgsql/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress --inputdir=./ --bindir='/usr/local/pgsql/bin'    --load-extension=age --inputdir=.//regress --outputdir=.//regress --temp-instance=.//regress/instance --port=61958 --encoding=UTF-8 --dbname=contrib_regression scan graphid agtype catalog cypher expr cypher_create cypher_match cypher_unwind cypher_set cypher_remove cypher_delete cypher_with cypher_vle cypher_union cypher_call cypher_merge age_global_graph age_load index analyze graph_generation name_validation drop
+++ regress install-check in  +++
============== removing existing temp instance        ==============
============== creating temporary instance            ==============
============== initializing database system           ==============
============== starting postmaster                    ==============
running on port 61958 with PID 2533
============== creating database "contrib_regression" ==============
CREATE DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
ALTER DATABASE
============== installing age                         ==============
CREATE EXTENSION
============== running regression test queries        ==============
test scan                         ... ok          250 ms
test graphid                      ... ok           16 ms
test agtype                       ... ok          198 ms
test catalog                      ... ok           98 ms
test cypher                       ... ok           29 ms
test expr                         ... ok          732 ms
test cypher_create                ... ok          135 ms
test cypher_match                 ... ok          547 ms
test cypher_unwind                ... ok           58 ms
test cypher_set                   ... ok          145 ms
test cypher_remove                ... ok          102 ms
test cypher_delete                ... ok          115 ms
test cypher_with                  ... ok           86 ms
test cypher_vle                   ... ok         1125 ms
test cypher_union                 ... ok           60 ms
test cypher_call                  ... ok           51 ms
test cypher_merge                 ... ok          207 ms
test age_global_graph             ... ok          179 ms
test age_load                     ... ok         1759 ms
test index                        ... ok          109 ms
test analyze                      ... ok           36 ms
test graph_generation             ... ok          118 ms
test name_validation              ... ok          142 ms
test drop                         ... ok          170 ms
============== shutting down postmaster               ==============
============== removing temporary instance            ==============

======================
 All 24 tests passed. 
======================

markgomer avatar Aug 15 '23 12:08 markgomer

This PR is stale because it has been open 45 days with no activity. Remove "Abondoned" label or comment or this will be closed in 7 days.

github-actions[bot] avatar May 11 '24 00:05 github-actions[bot]

This PR was closed because it has been stalled for further 7 days with no activity

github-actions[bot] avatar May 19 '24 00:05 github-actions[bot]

@markgomer Should we try to update this PR for 1.5.0?

jrgemignani avatar May 22 '24 20:05 jrgemignani

Hello @jrgemignani , sure, I'll update it.

markgomer avatar May 24 '24 13:05 markgomer

This PR was closed because it has been stalled for further 14 days with no activity

github-actions[bot] avatar Jun 08 '24 00:06 github-actions[bot]