[I] What is the best practices for creating vertices and edges in AGE to avoid duplicates and maximize performance? [age]

2024-01-22 Thread via GitHub


MatheusFarias03 opened a new issue, #1517:
URL: https://github.com/apache/age/issues/1517

   Hi folks! I've been working on a Python project that collects 3851 vertices 
and creates 12507 edges. I want to store this data in AGE, but I'm not quite 
sure about the best approach.
   
   The data collection is performed using Python's Beautiful Soup, a web 
scraping library. I then create objects representing vertices, edges, and the 
graph. Vertices and edges are stored in their respective arrays within the 
graph class.
   
   For creating vertices in AGE, I use the MERGE clause to check if a vertex 
with the same label and properties already exists in the graph before creating 
it:
   
   ```python
   query = f'''
   SELECT * FROM cypher('{graph_name}', $$ 
   MERGE (:{vertex.label} {properties}) 
   $$) AS (n agtype); 
   '''
   ```
   
   This works well for creating each vertex independently.
   
   However, during testing with AGE, I noticed that when vertices are created 
this way and the following query is executed:
   ```py
   query=f'''
   SELECT * FROM cypher('{graph_name}', $$
   MERGE (a:{from_v_label} {from_v_properties})-[e:{e_label}]->(b:{to_v_label} 
{to_v_properties})
   $$) AS (e agtype);
   '''
   ```
   
   If the vertices already exist, it creates duplicates of the vertices.
   
   So, my question is, what is the best way to create vertices and edges 
without duplicating vertices that may already exist and with good performance? 
Thank you for taking the time to read my question.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [VOTE] Apache AGE 1.5.0 Release for PostgreSQL 16

2024-01-22 Thread Muhammad Shoaib
+1
Checked the following:
- Tag
- Hash
- Signature
- Link

On Mon, Jan 22, 2024 at 9:15 PM Muhammad Taha Naveed
 wrote:

> +1
>
> - Signature and Hash => checked
> - Tags and links => checked
> - No unexpected binary files => checked
> - Validity of release notes => checked
> - Regression tests => checked (all passing)
> - Driver tests => checked
>
> Regards
> Muhammad Taha Naveed
>
> On Thu, Jan 18, 2024, 03:13 John Gemignani 
> wrote:
>
> > Dear Apache Community,
> >
> > Please carefully read all instructions as they may have changed since the
> > last vote thread.
> >
> > This is an official vote for Apache AGE release 1.5.0 for PostgreSQL 16.
> >
> > To learn more about Apache AGE, please see http://age.apache.org/
> >
> > Functionalities included and addressed in this release are:
> >
> > *
> > Release Notes for Apache AGE release 1.5.0 for PostgreSQL version 16
> >
> > Apache AGE 1.5.0 - Release Notes
> >
> > NOTE: This is an initial release of Apache AGE for PostgreSQL version
> > 16. There are no upgrade scripts to this release.
> >
> > Add additional index support and performance enhancements (#1232)
> > Add an additional way to find a previous variable ref (#1450)
> > Add auto apply labeler workflow for PRs (#1161)
> > Add checks for array functions to recognize and decode VPC (#1064)
> > Add concat || operator to agtype (#1198)
> > Add exist(?, ?|, ?&) operators for agtype (#1218)
> > Add missing dependency in cypher_expr.c (#1256)
> > Add path extraction(#>, #>>)operators to agtype (#1224)
> > Add support for chained expressions in CASE (#1431)
> > Clean up agtype_to_int8, agtype_to_int4, & agtype_to_int2 (#1354)
> > Clean up #included files in parser directory (#1465)
> > Converted SQL main file into multiple files. (#1401)
> > docs: Add to Docker setup (#1204)
> > Extend access(->, ->>), addition and subtraction operators (#1258)
> > Extend agtype containment operators (@>, <@) (#1285)
> > Extend EXPLAIN and add config param to switch transformation of property
> > filter (#1262)
> > Fix ambiguous conditions (#1373)
> > Fix Docker file to reflect PostgreSQL version 15 (#1449)
> > Fix DockerHub warning messages for latest (#1380)
> > Fix issue #1045 - error using path var in WHERE (#1295)
> > Fix Issue #1159 - Server terminates for SET plus-equal (#1160)
> > Fix issue #1219 - MERGE not seeing previous clause var (#1441)
> > Fix issue #1302 - crash on NULL input to UNWIND (#1304)
> > Fix issue #1303: Server crashes on executing SELECT * FROM agtype(null);
> > (#1317)
> > Fix Issue #1305 - drop_label NULL cases (#1306)
> > Fix Issue #1329 - agtype_to_int4 crash (#1339)
> > Fix issue #1347 - unknow type of agtype container 0 (#1349)
> > Fix issue #1389 - Server crash on using null operand for access operators
> > (#1390)
> > Fix issue #1393 - previous clause variables not seen with EXISTS (#1426)
> > Fix issue #1398 - SET followed by DELETE does not delete (#1412)
> > Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400)
> > Fix Issue #945 - incorrect count(*) return values (#1288)
> > Fix typo in agtype_raw.h header guard (#1368)
> > Implement chained expression order of operations (#1402)
> > Implemented age_tail function (#1283)
> > Implemented the toBooleanList() function (#1014)
> > Implement EXISTS subquery for CASE (#1345)
> > Master to PostgreSQL version 16 (#1451)
> > Minor fix in agtype_volatile_wrapper function (#1172)
> > Modify COUNT() to output agtype (#1311)
> > Optimize performance of detach delete (#1271)
> > Optimize vertex and edge builder functions (#1252)
> > py_driver : optimised Antlr4ResultHandler to improve time (#1107)
> > Refactor Regression Tests for CASE statement (#1268)
> > Refactor the IN operator to use '= ANY()' syntax (#1236)
> > Removed unnecessary assignment (#1185)
> > Remove redundant job from CIs (#1473)
> > Remove unnecessary #include in src/backend/utils
> > Updated age.control.
> > Updated files, format, and version information.
> > Updated Makefile.
> > Updated RELEASE.
> > Update Discord channel in README.md (#1253)
> > Update README.md file for PostgreSQL version 16 support (#1463)
> > Update the Python Driver (#1246)
> >
> > *
> >
> > !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, and
> keys
> > !!!
> >
> > The git tag to be discussed and voted on:
> > https://github.com/apache/age/releases/tag/PG16/v1.5.0-rc0
> >
> > The git commit hash:
> > commit 0048900f372d4dfd5c236f78b8a8453bcdbb458e
> >
> > The release files for 1.5.0, can be found at:
> > https://dist.apache.org/repos/dist/dev/age/PG16/1.5.0.rc0/
> >
> > Signatures used for AGE RCs can be found in this file:
> > https://downloads.apache.org/age/KEYS
> >
> > The fingerprint of key to sign release artifacts:
> > 4293 0603 8E35 AC05 4DBB  4B58 26B6 CD9D CD5B 0045
> >
> > For information about the contents of 

Re: [VOTE] Apache AGE 1.5.0 Release for PostgreSQL 16

2024-01-22 Thread Muhammad Taha Naveed
+1

- Signature and Hash => checked
- Tags and links => checked
- No unexpected binary files => checked
- Validity of release notes => checked
- Regression tests => checked (all passing)
- Driver tests => checked

Regards
Muhammad Taha Naveed

On Thu, Jan 18, 2024, 03:13 John Gemignani 
wrote:

> Dear Apache Community,
>
> Please carefully read all instructions as they may have changed since the
> last vote thread.
>
> This is an official vote for Apache AGE release 1.5.0 for PostgreSQL 16.
>
> To learn more about Apache AGE, please see http://age.apache.org/
>
> Functionalities included and addressed in this release are:
>
> *
> Release Notes for Apache AGE release 1.5.0 for PostgreSQL version 16
>
> Apache AGE 1.5.0 - Release Notes
>
> NOTE: This is an initial release of Apache AGE for PostgreSQL version
> 16. There are no upgrade scripts to this release.
>
> Add additional index support and performance enhancements (#1232)
> Add an additional way to find a previous variable ref (#1450)
> Add auto apply labeler workflow for PRs (#1161)
> Add checks for array functions to recognize and decode VPC (#1064)
> Add concat || operator to agtype (#1198)
> Add exist(?, ?|, ?&) operators for agtype (#1218)
> Add missing dependency in cypher_expr.c (#1256)
> Add path extraction(#>, #>>)operators to agtype (#1224)
> Add support for chained expressions in CASE (#1431)
> Clean up agtype_to_int8, agtype_to_int4, & agtype_to_int2 (#1354)
> Clean up #included files in parser directory (#1465)
> Converted SQL main file into multiple files. (#1401)
> docs: Add to Docker setup (#1204)
> Extend access(->, ->>), addition and subtraction operators (#1258)
> Extend agtype containment operators (@>, <@) (#1285)
> Extend EXPLAIN and add config param to switch transformation of property
> filter (#1262)
> Fix ambiguous conditions (#1373)
> Fix Docker file to reflect PostgreSQL version 15 (#1449)
> Fix DockerHub warning messages for latest (#1380)
> Fix issue #1045 - error using path var in WHERE (#1295)
> Fix Issue #1159 - Server terminates for SET plus-equal (#1160)
> Fix issue #1219 - MERGE not seeing previous clause var (#1441)
> Fix issue #1302 - crash on NULL input to UNWIND (#1304)
> Fix issue #1303: Server crashes on executing SELECT * FROM agtype(null);
> (#1317)
> Fix Issue #1305 - drop_label NULL cases (#1306)
> Fix Issue #1329 - agtype_to_int4 crash (#1339)
> Fix issue #1347 - unknow type of agtype container 0 (#1349)
> Fix issue #1389 - Server crash on using null operand for access operators
> (#1390)
> Fix issue #1393 - previous clause variables not seen with EXISTS (#1426)
> Fix issue #1398 - SET followed by DELETE does not delete (#1412)
> Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400)
> Fix Issue #945 - incorrect count(*) return values (#1288)
> Fix typo in agtype_raw.h header guard (#1368)
> Implement chained expression order of operations (#1402)
> Implemented age_tail function (#1283)
> Implemented the toBooleanList() function (#1014)
> Implement EXISTS subquery for CASE (#1345)
> Master to PostgreSQL version 16 (#1451)
> Minor fix in agtype_volatile_wrapper function (#1172)
> Modify COUNT() to output agtype (#1311)
> Optimize performance of detach delete (#1271)
> Optimize vertex and edge builder functions (#1252)
> py_driver : optimised Antlr4ResultHandler to improve time (#1107)
> Refactor Regression Tests for CASE statement (#1268)
> Refactor the IN operator to use '= ANY()' syntax (#1236)
> Removed unnecessary assignment (#1185)
> Remove redundant job from CIs (#1473)
> Remove unnecessary #include in src/backend/utils
> Updated age.control.
> Updated files, format, and version information.
> Updated Makefile.
> Updated RELEASE.
> Update Discord channel in README.md (#1253)
> Update README.md file for PostgreSQL version 16 support (#1463)
> Update the Python Driver (#1246)
>
> *
>
> !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, and keys
> !!!
>
> The git tag to be discussed and voted on:
> https://github.com/apache/age/releases/tag/PG16/v1.5.0-rc0
>
> The git commit hash:
> commit 0048900f372d4dfd5c236f78b8a8453bcdbb458e
>
> The release files for 1.5.0, can be found at:
> https://dist.apache.org/repos/dist/dev/age/PG16/1.5.0.rc0/
>
> Signatures used for AGE RCs can be found in this file:
> https://downloads.apache.org/age/KEYS
>
> The fingerprint of key to sign release artifacts:
> 4293 0603 8E35 AC05 4DBB  4B58 26B6 CD9D CD5B 0045
>
> For information about the contents of this release see:
> https://github.com/apache/age/releases/tag/PG16/v1.5.0-rc0
>
> *
>
> !!! IMPORTANT PLEASE READ !!!
>
> Please note that Apache REQUIRES the following information to be in your
> response to the vote, in order for it to be valid -
>
> - If you are a binding vote, a PMC, then 

Re: [VOTE] Apache AGE 1.5.0 Release for PostgreSQL 16

2024-01-22 Thread Rafsun Masud
+1
Checked the following:
- Tag
- Hash
- Signature
- Link

It looks ready for the release. Great work!

--
*Rafsun Masud*
rafsu...@bitnine.net


On Wed, Jan 17, 2024 at 2:13 PM John Gemignani 
wrote:

> Dear Apache Community,
>
> Please carefully read all instructions as they may have changed since the
> last vote thread.
>
> This is an official vote for Apache AGE release 1.5.0 for PostgreSQL 16.
>
> To learn more about Apache AGE, please see http://age.apache.org/
>
> Functionalities included and addressed in this release are:
>
> *
> Release Notes for Apache AGE release 1.5.0 for PostgreSQL version 16
>
> Apache AGE 1.5.0 - Release Notes
>
> NOTE: This is an initial release of Apache AGE for PostgreSQL version
> 16. There are no upgrade scripts to this release.
>
> Add additional index support and performance enhancements (#1232)
> Add an additional way to find a previous variable ref (#1450)
> Add auto apply labeler workflow for PRs (#1161)
> Add checks for array functions to recognize and decode VPC (#1064)
> Add concat || operator to agtype (#1198)
> Add exist(?, ?|, ?&) operators for agtype (#1218)
> Add missing dependency in cypher_expr.c (#1256)
> Add path extraction(#>, #>>)operators to agtype (#1224)
> Add support for chained expressions in CASE (#1431)
> Clean up agtype_to_int8, agtype_to_int4, & agtype_to_int2 (#1354)
> Clean up #included files in parser directory (#1465)
> Converted SQL main file into multiple files. (#1401)
> docs: Add to Docker setup (#1204)
> Extend access(->, ->>), addition and subtraction operators (#1258)
> Extend agtype containment operators (@>, <@) (#1285)
> Extend EXPLAIN and add config param to switch transformation of property
> filter (#1262)
> Fix ambiguous conditions (#1373)
> Fix Docker file to reflect PostgreSQL version 15 (#1449)
> Fix DockerHub warning messages for latest (#1380)
> Fix issue #1045 - error using path var in WHERE (#1295)
> Fix Issue #1159 - Server terminates for SET plus-equal (#1160)
> Fix issue #1219 - MERGE not seeing previous clause var (#1441)
> Fix issue #1302 - crash on NULL input to UNWIND (#1304)
> Fix issue #1303: Server crashes on executing SELECT * FROM agtype(null);
> (#1317)
> Fix Issue #1305 - drop_label NULL cases (#1306)
> Fix Issue #1329 - agtype_to_int4 crash (#1339)
> Fix issue #1347 - unknow type of agtype container 0 (#1349)
> Fix issue #1389 - Server crash on using null operand for access operators
> (#1390)
> Fix issue #1393 - previous clause variables not seen with EXISTS (#1426)
> Fix issue #1398 - SET followed by DELETE does not delete (#1412)
> Fix issue #1399 EXISTS doesn't handle non-existent labels (#1400)
> Fix Issue #945 - incorrect count(*) return values (#1288)
> Fix typo in agtype_raw.h header guard (#1368)
> Implement chained expression order of operations (#1402)
> Implemented age_tail function (#1283)
> Implemented the toBooleanList() function (#1014)
> Implement EXISTS subquery for CASE (#1345)
> Master to PostgreSQL version 16 (#1451)
> Minor fix in agtype_volatile_wrapper function (#1172)
> Modify COUNT() to output agtype (#1311)
> Optimize performance of detach delete (#1271)
> Optimize vertex and edge builder functions (#1252)
> py_driver : optimised Antlr4ResultHandler to improve time (#1107)
> Refactor Regression Tests for CASE statement (#1268)
> Refactor the IN operator to use '= ANY()' syntax (#1236)
> Removed unnecessary assignment (#1185)
> Remove redundant job from CIs (#1473)
> Remove unnecessary #include in src/backend/utils
> Updated age.control.
> Updated files, format, and version information.
> Updated Makefile.
> Updated RELEASE.
> Update Discord channel in README.md (#1253)
> Update README.md file for PostgreSQL version 16 support (#1463)
> Update the Python Driver (#1246)
>
> *
>
> !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, and keys
> !!!
>
> The git tag to be discussed and voted on:
> https://github.com/apache/age/releases/tag/PG16/v1.5.0-rc0
>
> The git commit hash:
> commit 0048900f372d4dfd5c236f78b8a8453bcdbb458e
>
> The release files for 1.5.0, can be found at:
> https://dist.apache.org/repos/dist/dev/age/PG16/1.5.0.rc0/
>
> Signatures used for AGE RCs can be found in this file:
> https://downloads.apache.org/age/KEYS
>
> The fingerprint of key to sign release artifacts:
> 4293 0603 8E35 AC05 4DBB  4B58 26B6 CD9D CD5B 0045
>
> For information about the contents of this release see:
> https://github.com/apache/age/releases/tag/PG16/v1.5.0-rc0
>
> *
>
> !!! IMPORTANT PLEASE READ !!!
>
> Please note that Apache REQUIRES the following information to be in your
> response to the vote, in order for it to be valid -
>
> - If you are a binding vote, a PMC, then you MUST state it in your
>   response. Otherwise, leave it out. Do not 

Re: [I] The Go driver becomes "undefined: parser", and the application cannot be built. [age]

2024-01-22 Thread via GitHub


jrgemignani commented on issue #1455:
URL: https://github.com/apache/age/issues/1455#issuecomment-1904279322

   @maehara-n The JAVA environment is up to the user to provide and so is the 
database connection information. The other stuff, yeah, **if it is stated to be 
automatic or automated**, it isn't. The individual who wrote the scripts didn't 
write them very well. We will need to fix them.
   
   As for having to manually generate files, that shouldn't be an issue for 
you, provided the documentation either states how to do it or there are scripts 
to do it automatically.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



Re: [I] The Go driver becomes "undefined: parser", and the application cannot be built. [age]

2024-01-22 Thread via GitHub


maehara-n commented on issue #1455:
URL: https://github.com/apache/age/issues/1455#issuecomment-1903867007

   @jrgemignani Prepare the JAVA environment, follow the steps to create the 
files, and place the files to eliminate the errors. 
   However, this cannot be called automated generation. 
   What troubles me is that I have to manually generate them.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@age.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org