[GitHub] [age] cho2hhun opened a new issue, #1234: [Hybrid Query]Cannot use SQL function in Cypher query

2023-09-18 Thread via GitHub


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

   I've used Agens Graph and AGE many times, and I think there is a point that 
hope to revise like Agens Graph
   
   In AGE, it cannot use **PostgreSQL function in Cypher query** but Agens 
Graph was possible to use PG function in Cypher clause
   
   the example is like below
   
   **[case 1. AGE ]**
   ```
   select * from cypher ('car' $$
   match (a : vt_car) -[r : eg_eng_use2]->(b : vt_engine)
   return corr(r.fe, r.co2) as corr $$) as (corr numeric)
   ```
   then error is occured like below
   
   ```
   ERROR:  function ag_catalog.age_corr(agtype, agtype) does not exist
   ```
   
   **[case 2. Agens Graph]**
   ```
   match (a : vt_car) -[r : eg_eng_use2]->(b : vt_engine)
   return corr(r.fe, r.co2) as corr
   ```
   In the case of Agens Graph, It is possible to use PG function in Cypher 
clause
   
   
   the thing that you need to notice is that ```corr()``` is a **PostgreSQL 
function**
   
   I think the schema ```ag_catalog``` doesnt have **PG functions** but only 
have AGE's unique functions
   
   So I Think it might as well to add PG function in ```ag_catalog``` So we can 
use PG functions in Cypher clause and It could be fluent **Hybrid Query**!!! 
cause many people dont know exactly about Cypher functions, It might be really 
good for user who is knowing for PG SQL 
   
   
   **Environment (please complete the following information):**
   - Version: 13
   
   
   


-- 
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



[GitHub] [age] cho2hhun commented on issue #1226: [Creating Table]Creating Table, Temporary Table, View from Graph in AGE

2023-09-18 Thread via GitHub


cho2hhun commented on issue #1226:
URL: https://github.com/apache/age/issues/1226#issuecomment-1724698016

   Hello @jrgemignani !!
   
   For example if i try to make table with `SELECT` query that is including 
cypher query, then **_table_ and _temporary table_ is not created**
   
   below is query
   
   ```
   create table tbtb as (
   select * from cypher ('car', $$
 match (a : vt_car)
 return a $$) as (a agtype)
   );
   ```
   
   and error is like below
   
   ```
   ERROR:  unhandled cypher(cstring) function call
   DETAIL:  car
   SQL state: XX000
   ```
   


-- 
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



[GitHub] [age] cho2hhun commented on issue #1225: [Data Casting] 'agtype' Casting

2023-09-18 Thread via GitHub


cho2hhun commented on issue #1225:
URL: https://github.com/apache/age/issues/1225#issuecomment-1724693861

   @KamleshKumar427 Thank you for your advice!
   
   I'de read many times the document that you linked, But in that Document, I 
Think There are problems also :(
   
   First
   The Cypher 'List' only printed 'agtype' and with that result, there are 
nothing to do in select query, in a nutshell the 'List' that extracted from 
Cypher doesn't need and play a role as a **list or array**
   For example, to use list that extracted from Cypher,  fi**rst we may cast it 
into 'varchar'**, **second we need to cast it into 'array'**
   **With the example query of that document, the query describe extracting 
list**
   ```
   SELECT *
   FROM cypher('graph_name', $$
   WITH [null] as lst
   RETURN lst
   $$) AS (lst agtype);
   ```
   if u run this query, then list column 'lst' will be extracted. but to 
utilize in SQL query, it is nothing... it is not array or list even not any 
string So to use this, maybe need to two-times casting like below
   `SELECT string_to_array(lst::varchar, ',')
   FROM cypher('graph_name', $$
   WITH [null] as lst
   RETURN lst
   $$) AS (lst agtype);'
   actually to use list that extracted cypher need two-times casting for using 
in SQL, SO I dont think it is efficient.
   **Hence, automatical 'agtype' casting to JSON, ARRAY, any string is really 
needed** 
   
   
   Second the query that descirbed in document you sent is like that
   ```
   SELECT *
   FROM cypher('graph_name', $$
   WITH {listKey: [{inner: 'Map1'}, {inner: 'Map2'}], mapKey: {i: 0}} as m
   RETURN m
   $$) AS (m agtype);
   ```
   but as I mentioned, It has same problem ; **two-times casting**
   after extracting the JSON data from Cypher, then we might cast it into 
'varchar' and 'json'(actually casting to proper json from agtype is 
complex.,you guys need use regular expression also to properly parse to 
json, ), and It's cost is too high to cast two-times...
   
   
   
   P.S. in the case of agtype that formed Json, I normally use the below method
   `replace(regexp_replace(**col**::varchar, '::[a-zA-Z0-9\[\]]+', '', 'g'), 
E'\"', '"')::jsonb;`
   I've researched for casting agtype into other datatype, but until now, It is 
at least fine to cast json
   
   
   **So I think agtype need many improvements in casting problem.**
   
   


-- 
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



[GitHub] [age] cho2hhun commented on issue #1225: [Data Casting] 'agtype' Casting

2023-09-18 Thread via GitHub


cho2hhun commented on issue #1225:
URL: https://github.com/apache/age/issues/1225#issuecomment-1724628778

   Hi @Allison-E I've tried various Code but Problems are like that
   
   1. agtype only possible to cast as 'varchar' for string Data, not 'text' etc
   2. actually agtype is normally used to treat 'key-value' data like 'json', 
'jsonb' type, but cannot parsing as 'key-value' data in python, Java 
enviroments. only parsed as string like `"{a : 1, b : 2}"`  not like `{a : 
1, b : 2}`
   indeed in PG enviroment, it doesn't matter to use agtype because it can be 
extracted 'key' and 'value' like 'jsonb'. So I think someone have to control it 
to **possible parse in other enviroment** and to **cast into Other data type 
like 'text'**


-- 
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: [VOTE] Apache AGE 1.4.0 Release for PostgreSQL 15

2023-09-18 Thread Dehowe Feng
Vote: +1 binding

I did the usual checks:
- Signature and hash
- Links and tags
- LICENSE and NOTICE
- No unexpected binary files

Cheers

On Mon, Sep 18, 2023 at 9:11 AM 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 (24 passing)
> - Driver tests => checked
>
> Regards
> Muhammad Taha Naveed
>
> On Thu, Sep 14, 2023 at 5:15 AM 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.4.0 for PostgreSQL 15.
> >
> > To learn more about Apache AGE, please see http://age.apache.org/
> >
> > Functionalities included and issues addressed in this release are:
> >
> > *
> > Release Notes for Apache AGE release v1.4.0 for PostgreSQL 15
> >
> > NOTE: This is an initial release of PG15. There are no upgrade
> >   scripts to this release.
> >
> > NOTE: Some of these reference the master branch PR that was
> >   either applied to lower versions via a separate PR or
> >   merged into a newly created branch.
> >
> > Added license in Python driver README.md (#956)
> > Added the toStringList() function (#1128)
> > Added toBooleanList() (#1165)
> > Added toFloatList() function (#1016)
> > Added toIntegerList() function (#1025)
> > Added regression tests for MATCH clause using labels only (#1019)
> > Added REGTYPEOID to toString function (#1036)
> > Added Dockerfile.dev & move docker-related files to "docker/" (#943)
> > Fixed complex MERGE causes crash (#897) (#961)
> > Fixed docker build files (#1104)
> > Fixed case sensitivity on label usage of reserved keyword (#1040)
> > Fixed issue 1000: Indexes created on WHERE (#1133)
> > Fixed issue 1002: Invalid reuse of variables in MATCH clause (#1003)
> > Fixed issue 1033: access operator on vle edge lists (#1037)
> > Fixed issue 1043: ERROR:  container must be an array or object (#1046)
> > Fixed issue 1124: Segmentation fault when using specific tables (#1125)
> > Fixed issue 395: ERROR: container is not an agtype array (#1039)
> > Fixed issue 870: regarding orderability and added regression tests (#994)
> > Fixed issue 876: column reference "_age_default_alias_0" is ambiguous
> > (#931)
> > Fixed issue 975: Invalid reuse of variables in CREATE clause (#977)
> > Fixed issue 989: Impossible to create array with > 100 items (#1001)
> > Fixed memory leak issues with age_load (#1142)
> > Fixed memory leaks in MERGE (merge_edge & merge_vertex) (#958)
> > Fixed MERGE crashes due to incorrect label type (#957)
> > Fixed MERGE variable reuse (#997)
> > Fixed misspellings in many AGE files (#985)
> > Fixed warning messages in DockerHub builds. (#1075)
> > Modified test_agtypes to view useful testing message (#992)
> > Optimised Antlr4ResultHandler initialization (#1169)
> > Updated CIs to pull correct image based on branch (#1105)
> > Updated files, format, and version information (#1063)
> > Updated README.
> >
> > *
> >
> > !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, & keys
> > !!!
> >
> > The git tag to be discussed and voted on:
> > https://github.com/apache/age/releases/tag/PG15/v1.4.0-rc0
> >
> > The git commit hash:
> > commit 45f936bd0de92d57c4393ccfb5758d12230cbe24
> >
> > The release files for 1.4.0, can be found at:
> > https://dist.apache.org/repos/dist/dev/age/PG15/1.4.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/PG15/v1.4.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 mention it if you are
> >   not a PMC.
> >
> > - You MUST state what you checked to support your vote. See
> >   the samples given below for guidance.
> >
> > - You MUST, at a minimum, check the above tags, hash,
> >   links, and signatures for validity.
> >
> > - You CANNOT just say, +1 or 0. You need to state what items
> >   you checked.
> >
> > If your vote DOES NOT follow the above guidelines or samples below, it
> may
> > be thrown out.
> >
> > !!! IMPORTANT PLEASE READ !!!
> >
> > Please vote as follows -
> >
> > +1, Release this package as Apache AGE 1.4.0 for 

[GitHub] [age] jimenasansav commented on issue #1217: Java Driver - Gradle/Java error when installing from source

2023-09-18 Thread via GitHub


jimenasansav commented on issue #1217:
URL: https://github.com/apache/age/issues/1217#issuecomment-1724558361

   Hi @iabmatos, thank you for sharing your issues! 
   Please do not hesitate to share other problems you are facing. Our team is 
always willing to help!


-- 
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



[GitHub] [age] jrgemignani commented on issue #1219: MERGE does not set properties involving variables

2023-09-18 Thread via GitHub


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

   The query also succeeds in these cases -
   
   ```
   psql-15.4-5432-pgsql=# SELECT * FROM cypher('xyz', $$ MATCH 
(x:Label1{arr:[1,2,3,4]})
   MERGE (y:Label2{key1:2, key2:x.arr, key3:3}) RETURN x $$) as (a agtype);
   a
   
-
{"id": 844424930131971, "label": "Label1", "properties": {"arr": [1, 2, 3, 
4]}}::vertex
   (1 row)
   
   psql-15.4-5432-pgsql=# SELECT * FROM cypher('xyz', $$ MATCH (u) return u$$) 
as (a agtype);
   a
   
-
{"id": 844424930131971, "label": "Label1", "properties": {"arr": [1, 2, 3, 
4]}}::vertex
{"id": 1125899906842636, "label": "Label2", "properties": {"key1": 2, 
"key2": [1, 2, 3, 4], "key3": 3}}::vertex
   (2 rows)
   
   psql-15.4-5432-pgsql=#
   ```
   ```
   psql-15.4-5432-pgsql=# SELECT * FROM cypher('xyz', $$ MATCH 
(x:Label1{arr:[1,2,3,4]})
   MERGE (y:Label2{key1:2, key2:x.arr, key3:3}) $$) as (a agtype);
a
   ---
   (0 rows)
   
   psql-15.4-5432-pgsql=# SELECT * FROM cypher('xyz', $$ MATCH (u) return u$$) 
as (a agtype);
   a
   
-
{"id": 844424930131972, "label": "Label1", "properties": {"arr": [1, 2, 3, 
4]}}::vertex
{"id": 1125899906842637, "label": "Label2", "properties": {"key1": 2, 
"key2": [1, 2, 3, 4], "key3": 3}}::vertex
   (2 rows)
   
   psql-15.4-5432-pgsql=#
   ```
   
   


-- 
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



[GitHub] [age] ksheroz commented on issue #1219: MERGE does not set properties involving variables

2023-09-18 Thread via GitHub


ksheroz commented on issue #1219:
URL: https://github.com/apache/age/issues/1219#issuecomment-1724030759

   > Some observations:
   > 
   > * The same query with `CREATE` instead of `MERGE` works just fine
   > 
   > ```
   > SELECT * FROM cypher('xyz', 
   > $$
   > MATCH (x:Label1{arr:[1,2,3,4]})
   > CREATE (y:Label2{key1:2, key2:x.arr, key3:3})
   > RETURN y
   > $$) as (a agtype);
   > ```
   > 
   >  * The same query with `MERGE` twice also works just fine
   > 
   > ```
   > SELECT * FROM cypher('xyz', 
   > $$
   > MATCH (x:Label1{arr:[1,2,3,4]})
   > MERGE (y:Label2{key1:2, key2:x.arr, key3:3})
   > MERGE (z:Label2{key1:2, key2:x.arr, key3:3})
   > RETURN y
   > $$) as (a agtype);
   > ```
   > 
   > Next, let us analyze the Query Plan Trees for `MATCH`-`MERGE`, 
`MATCH`-`CREATE`, and `MATCH`-`MERGE`-`MERGE` queries.
   > 
   > * Query plan for `MATCH`-`MERGE`:
   > 
   > ```
   >  Custom Scan (Cypher Merge)  (cost=0.00..0.00 rows=0 width=32)
   >->  Subquery Scan on _age_default_alias_previous_cypher_clause  
(cost=0.00..86.02 rows=1 width=32)
   >  ->  Nested Loop Left Join  (cost=0.00..86.00 rows=1 width=96)
   >Join Filter: (z.properties @> 
agtype_build_map('key1'::text, '2'::agtype, 'key2'::text, 
agtype_access_operator(VARIADIC ARRAY[_agtype_build_vertex(x.id, 
_label_name('18201'::oid, x.id), x.
   > properties), '"arr"'::agtype]), 'key3'::text, '3'::agtype))
   >->  Seq Scan on "Label1" x  (cost=0.00..31.00 rows=1 
width=40)
   >  Filter: (properties @> agtype_build_map('arr'::text, 
agtype_build_list('1'::agtype, '2'::agtype, '3'::agtype, '4'::agtype)))
   >->  Seq Scan on "Label2" z  (cost=0.00..28.00 rows=1200 
width=64)
   > (7 rows)
   > ```
   > 
   > * Query plan for `MATCH`-`CREATE`:
   > 
   > ```
   >  Custom Scan (Cypher Create)  (cost=0.00..0.00 rows=0 width=32)
   >->  Subquery Scan on _age_default_alias_previous_cypher_clause  
(cost=0.00..31.03 rows=1 width=32)
   >  ->  Seq Scan on "Label1" x  (cost=0.00..31.02 rows=1 width=160)
   >Filter: (properties @> agtype_build_map('arr'::text, 
agtype_build_list('1'::agtype, '2'::agtype, '3'::agtype, '4'::agtype)))
   > (4 rows)
   > ```
   > 
   > * Query plan for `MATCH`-`MERGE`-`MERGE`:
   > 
   > ```
   >  Custom Scan (Cypher Merge)  (cost=0.00..0.00 rows=0 width=32)
   >->  Subquery Scan on _age_default_alias_previous_cypher_clause  
(cost=0.00..49.02 rows=1 width=32)
   >  ->  Nested Loop Left Join  (cost=0.00..49.01 rows=1 width=160)
   >Join Filter: (z.properties @> 
agtype_build_map('key1'::text, '2'::agtype, 'key2'::text, 
agtype_access_operator(VARIADIC 
ARRAY[_age_default_alias_previous_cypher_clause_1.x, '"arr"'::agtype
   > ]), 'key3'::text, '3'::agtype))
   >->  Custom Scan (Cypher Merge)  (cost=0.00..0.00 rows=0 
width=64)
   >  ->  Subquery Scan on 
_age_default_alias_previous_cypher_clause_1  (cost=0.00..86.02 rows=1 width=64)
   >->  Nested Loop Left Join  (cost=0.00..86.01 
rows=1 width=96)
   >  Join Filter: (y.properties @> 
agtype_build_map('key1'::text, '2'::agtype, 'key2'::text, 
agtype_access_operator(VARIADIC ARRAY[_agtype_build_vertex(x.id, 
_label_name('1820
   > 1'::oid, x.id), x.properties), '"arr"'::agtype]), 'key3'::text, 
'3'::agtype))
   >  ->  Seq Scan on "Label1" x  
(cost=0.00..31.00 rows=1 width=40)
   >Filter: (properties @> 
agtype_build_map('arr'::text, agtype_build_list('1'::agtype, '2'::agtype, 
'3'::agtype, '4'::agtype)))
   >  ->  Seq Scan on "Label2" y  
(cost=0.00..28.00 rows=1200 width=64)
   >->  Seq Scan on "Label2" z  (cost=0.00..28.00 rows=1200 
width=64)
   > (12 rows)
   > ```
   > 
   > Cannot draw a conclusion
   > 
   > @ksheroz What do you think?
   
   It seems like that the `Join Filter` is the issue here. Any idea which 
function triggers it?


-- 
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: [VOTE] Apache AGE 1.4.0 Release for PostgreSQL 15

2023-09-18 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 (24 passing)
- Driver tests => checked

Regards
Muhammad Taha Naveed

On Thu, Sep 14, 2023 at 5:15 AM 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.4.0 for PostgreSQL 15.
>
> To learn more about Apache AGE, please see http://age.apache.org/
>
> Functionalities included and issues addressed in this release are:
>
> *
> Release Notes for Apache AGE release v1.4.0 for PostgreSQL 15
>
> NOTE: This is an initial release of PG15. There are no upgrade
>   scripts to this release.
>
> NOTE: Some of these reference the master branch PR that was
>   either applied to lower versions via a separate PR or
>   merged into a newly created branch.
>
> Added license in Python driver README.md (#956)
> Added the toStringList() function (#1128)
> Added toBooleanList() (#1165)
> Added toFloatList() function (#1016)
> Added toIntegerList() function (#1025)
> Added regression tests for MATCH clause using labels only (#1019)
> Added REGTYPEOID to toString function (#1036)
> Added Dockerfile.dev & move docker-related files to "docker/" (#943)
> Fixed complex MERGE causes crash (#897) (#961)
> Fixed docker build files (#1104)
> Fixed case sensitivity on label usage of reserved keyword (#1040)
> Fixed issue 1000: Indexes created on WHERE (#1133)
> Fixed issue 1002: Invalid reuse of variables in MATCH clause (#1003)
> Fixed issue 1033: access operator on vle edge lists (#1037)
> Fixed issue 1043: ERROR:  container must be an array or object (#1046)
> Fixed issue 1124: Segmentation fault when using specific tables (#1125)
> Fixed issue 395: ERROR: container is not an agtype array (#1039)
> Fixed issue 870: regarding orderability and added regression tests (#994)
> Fixed issue 876: column reference "_age_default_alias_0" is ambiguous
> (#931)
> Fixed issue 975: Invalid reuse of variables in CREATE clause (#977)
> Fixed issue 989: Impossible to create array with > 100 items (#1001)
> Fixed memory leak issues with age_load (#1142)
> Fixed memory leaks in MERGE (merge_edge & merge_vertex) (#958)
> Fixed MERGE crashes due to incorrect label type (#957)
> Fixed MERGE variable reuse (#997)
> Fixed misspellings in many AGE files (#985)
> Fixed warning messages in DockerHub builds. (#1075)
> Modified test_agtypes to view useful testing message (#992)
> Optimised Antlr4ResultHandler initialization (#1169)
> Updated CIs to pull correct image based on branch (#1105)
> Updated files, format, and version information (#1063)
> Updated README.
>
> *
>
> !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, & keys
> !!!
>
> The git tag to be discussed and voted on:
> https://github.com/apache/age/releases/tag/PG15/v1.4.0-rc0
>
> The git commit hash:
> commit 45f936bd0de92d57c4393ccfb5758d12230cbe24
>
> The release files for 1.4.0, can be found at:
> https://dist.apache.org/repos/dist/dev/age/PG15/1.4.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/PG15/v1.4.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 mention it if you are
>   not a PMC.
>
> - You MUST state what you checked to support your vote. See
>   the samples given below for guidance.
>
> - You MUST, at a minimum, check the above tags, hash,
>   links, and signatures for validity.
>
> - You CANNOT just say, +1 or 0. You need to state what items
>   you checked.
>
> If your vote DOES NOT follow the above guidelines or samples below, it may
> be thrown out.
>
> !!! IMPORTANT PLEASE READ !!!
>
> Please vote as follows -
>
> +1, Release this package as Apache AGE 1.4.0 for PostgreSQL 15.
>   0, I won't get in the way of the vote.
>  -1, Do not release this package because 
>
>  !!! Followed by what you checked !!!
>
> Sample responses, two for PMCs (binding) and two for regular committers.
> These are only samples, do not copy/paste.
>
> Remember, (binding) is ONLY for PMCs. If you are not a PMC, DO NOT say
> binding. If you are a PMC, you must state it.
>
>+1 (binding)   

Re: [VOTE] Apache AGE 1.4.0 Release for PostgreSQL 15

2023-09-18 Thread Rafsun Masud
Dear Apache Community,

I am writing to vote for this release.

+1
Checked:
- Signature, hash
- Links, tags
- LICENSE and NOTICE
- Unexpected binary files (none)

Regards,
Rafsun Masud

On Wed, Sep 13, 2023 at 5:15 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.4.0 for PostgreSQL 15.
>
> To learn more about Apache AGE, please see http://age.apache.org/
>
> Functionalities included and issues addressed in this release are:
>
> *
> Release Notes for Apache AGE release v1.4.0 for PostgreSQL 15
>
> NOTE: This is an initial release of PG15. There are no upgrade
>   scripts to this release.
>
> NOTE: Some of these reference the master branch PR that was
>   either applied to lower versions via a separate PR or
>   merged into a newly created branch.
>
> Added license in Python driver README.md (#956)
> Added the toStringList() function (#1128)
> Added toBooleanList() (#1165)
> Added toFloatList() function (#1016)
> Added toIntegerList() function (#1025)
> Added regression tests for MATCH clause using labels only (#1019)
> Added REGTYPEOID to toString function (#1036)
> Added Dockerfile.dev & move docker-related files to "docker/" (#943)
> Fixed complex MERGE causes crash (#897) (#961)
> Fixed docker build files (#1104)
> Fixed case sensitivity on label usage of reserved keyword (#1040)
> Fixed issue 1000: Indexes created on WHERE (#1133)
> Fixed issue 1002: Invalid reuse of variables in MATCH clause (#1003)
> Fixed issue 1033: access operator on vle edge lists (#1037)
> Fixed issue 1043: ERROR:  container must be an array or object (#1046)
> Fixed issue 1124: Segmentation fault when using specific tables (#1125)
> Fixed issue 395: ERROR: container is not an agtype array (#1039)
> Fixed issue 870: regarding orderability and added regression tests (#994)
> Fixed issue 876: column reference "_age_default_alias_0" is ambiguous
> (#931)
> Fixed issue 975: Invalid reuse of variables in CREATE clause (#977)
> Fixed issue 989: Impossible to create array with > 100 items (#1001)
> Fixed memory leak issues with age_load (#1142)
> Fixed memory leaks in MERGE (merge_edge & merge_vertex) (#958)
> Fixed MERGE crashes due to incorrect label type (#957)
> Fixed MERGE variable reuse (#997)
> Fixed misspellings in many AGE files (#985)
> Fixed warning messages in DockerHub builds. (#1075)
> Modified test_agtypes to view useful testing message (#992)
> Optimised Antlr4ResultHandler initialization (#1169)
> Updated CIs to pull correct image based on branch (#1105)
> Updated files, format, and version information (#1063)
> Updated README.
>
> *
>
> !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, & keys
> !!!
>
> The git tag to be discussed and voted on:
> https://github.com/apache/age/releases/tag/PG15/v1.4.0-rc0
>
> The git commit hash:
> commit 45f936bd0de92d57c4393ccfb5758d12230cbe24
>
> The release files for 1.4.0, can be found at:
> https://dist.apache.org/repos/dist/dev/age/PG15/1.4.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/PG15/v1.4.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 mention it if you are
>   not a PMC.
>
> - You MUST state what you checked to support your vote. See
>   the samples given below for guidance.
>
> - You MUST, at a minimum, check the above tags, hash,
>   links, and signatures for validity.
>
> - You CANNOT just say, +1 or 0. You need to state what items
>   you checked.
>
> If your vote DOES NOT follow the above guidelines or samples below, it may
> be thrown out.
>
> !!! IMPORTANT PLEASE READ !!!
>
> Please vote as follows -
>
> +1, Release this package as Apache AGE 1.4.0 for PostgreSQL 15.
>   0, I won't get in the way of the vote.
>  -1, Do not release this package because 
>
>  !!! Followed by what you checked !!!
>
> Sample responses, two for PMCs (binding) and two for regular committers.
> These are only samples, do not copy/paste.
>
> Remember, (binding) is ONLY for PMCs. If you are not a PMC, DO NOT say
> binding. If you are a PMC, you must state it.
>
>+1 (binding)   +1
>Checked the following:   Checked the 

Re: [VOTE] Apache AGE 1.4.0 Release for PostgreSQL 15

2023-09-18 Thread Muhammad Shoaib
Dear Apache AGE Community,

I hope this message finds you well. I am writing to formally cast my vote
for the approval of Apache AGE version 1.4.0 for PG15.

My vote is as follows:
+1 (Binding)

I have conducted a thorough review of the release candidate and have
ensured that the following criteria have been met:

1. Signature and hash - I have checked and verified the cryptographic
signature and hash of the release candidate.
2. Links and tags - I have confirmed that all relevant links and tags in
the release are accurate and functional.
3. License and Notice - I have reviewed the license and notice files to
ensure compliance with Apache licensing requirements.
4. Release notes - I have examined the release notes and found them to be
comprehensive and accurate to the best of my knowledge.
5. No unexpected binary files - I have confirmed that there are no
unexpected binary files in the release.

Based on my assessment, I believe that Apache AGE version 1.4.0 for PG15
meets the necessary criteria for a successful release. I appreciate the
hard work and dedication of the contributors who have made this release
possible.

Thank you to everyone involved in this release, and I look forward to
seeing the continued progress of the Apache AGE project.

Best regards,
Shoaib

On Thu, Sep 14, 2023 at 2:14 AM 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.4.0 for PostgreSQL 15.
>
> To learn more about Apache AGE, please see http://age.apache.org/
>
> Functionalities included and issues addressed in this release are:
>
> *
> Release Notes for Apache AGE release v1.4.0 for PostgreSQL 15
>
> NOTE: This is an initial release of PG15. There are no upgrade
>   scripts to this release.
>
> NOTE: Some of these reference the master branch PR that was
>   either applied to lower versions via a separate PR or
>   merged into a newly created branch.
>
> Added license in Python driver README.md (#956)
> Added the toStringList() function (#1128)
> Added toBooleanList() (#1165)
> Added toFloatList() function (#1016)
> Added toIntegerList() function (#1025)
> Added regression tests for MATCH clause using labels only (#1019)
> Added REGTYPEOID to toString function (#1036)
> Added Dockerfile.dev & move docker-related files to "docker/" (#943)
> Fixed complex MERGE causes crash (#897) (#961)
> Fixed docker build files (#1104)
> Fixed case sensitivity on label usage of reserved keyword (#1040)
> Fixed issue 1000: Indexes created on WHERE (#1133)
> Fixed issue 1002: Invalid reuse of variables in MATCH clause (#1003)
> Fixed issue 1033: access operator on vle edge lists (#1037)
> Fixed issue 1043: ERROR:  container must be an array or object (#1046)
> Fixed issue 1124: Segmentation fault when using specific tables (#1125)
> Fixed issue 395: ERROR: container is not an agtype array (#1039)
> Fixed issue 870: regarding orderability and added regression tests (#994)
> Fixed issue 876: column reference "_age_default_alias_0" is ambiguous
> (#931)
> Fixed issue 975: Invalid reuse of variables in CREATE clause (#977)
> Fixed issue 989: Impossible to create array with > 100 items (#1001)
> Fixed memory leak issues with age_load (#1142)
> Fixed memory leaks in MERGE (merge_edge & merge_vertex) (#958)
> Fixed MERGE crashes due to incorrect label type (#957)
> Fixed MERGE variable reuse (#997)
> Fixed misspellings in many AGE files (#985)
> Fixed warning messages in DockerHub builds. (#1075)
> Modified test_agtypes to view useful testing message (#992)
> Optimised Antlr4ResultHandler initialization (#1169)
> Updated CIs to pull correct image based on branch (#1105)
> Updated files, format, and version information (#1063)
> Updated README.
>
> *
>
> !!! PLEASE VERIFY ALL of the below tags, hash, links, signatures, & keys
> !!!
>
> The git tag to be discussed and voted on:
> https://github.com/apache/age/releases/tag/PG15/v1.4.0-rc0
>
> The git commit hash:
> commit 45f936bd0de92d57c4393ccfb5758d12230cbe24
>
> The release files for 1.4.0, can be found at:
> https://dist.apache.org/repos/dist/dev/age/PG15/1.4.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/PG15/v1.4.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. 

[GitHub] [age] jrgemignani commented on issue #1000: Index is not used in the WHERE clause

2023-09-18 Thread via GitHub


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

   @vladiksun Yes, @rafsun42 and @dehowef have both been working on PRs for 
improving WHERE performance. Hopefully, we'll have them all out by the end of 
the week.


-- 
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



[GitHub] [age] vladiksun commented on issue #1000: Index is not used in the WHERE clause

2023-09-18 Thread via GitHub


vladiksun commented on issue #1000:
URL: https://github.com/apache/age/issues/1000#issuecomment-1723634217

   @jrgemignani, @rafsun42 ok I will create a new issue for the proposed 
solution for  IN operator and link it to the this one. Thank you.


-- 
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



[GitHub] [age] jrgemignani commented on issue #1000: Index is not used in the WHERE clause

2023-09-18 Thread via GitHub


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

   @vladiksun We probably should keep the issues separate but link them. Really 
long threads can lose their readability, especially if they diverge too much. 
Also, having a long thread with many issues gives the impression that it is 
just one issue that is being worked on, when it can be many more.


-- 
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



[GitHub] [age] vladiksun commented on issue #1000: Index is not used in the WHERE clause

2023-09-18 Thread via GitHub


vladiksun commented on issue #1000:
URL: https://github.com/apache/age/issues/1000#issuecomment-1723616635

   @jrgemignani I believe @rafsun42 also suggested the solution for IN 
operator. I can move the issue with "IN" operator to another ticket. Let me 
know if it is convenient to do so or leave this issue open until the solution 
for "IN" operator is implemented.


-- 
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



[GitHub] [age] jrgemignani commented on issue #1000: Index is not used in the WHERE clause

2023-09-18 Thread via GitHub


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

   @vladiksun We should probably look into these later queries separately. My 
tests were only against your query at the top of this thread and only on my 
server. If the issue with using WHERE is resolved? we should probably close 
this thread and create one for performance improvements and link this thread.
   
   Thoughts?


-- 
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



[GitHub] [age] vladiksun commented on issue #1000: Index is not used in the WHERE clause

2023-09-18 Thread via GitHub


vladiksun commented on issue #1000:
URL: https://github.com/apache/age/issues/1000#issuecomment-1723307224

   @jrgemignani Thanks for sharing the PR. I have built that branch to see how 
it could affect our typical queries.
   It turns out that for our use cases, we do not see much difference.
   Usually, our typical queries are like this:
   ```
   select properties from ag_catalog.cypher('test_graph',
                                            $$
   //EXPLAIN ANALYZE
   MATCH (start_vertex:`scope` {hidden: false})
   WHERE start_vertex.name = 'scope_1'
   OR start_vertex.name = 'scope_2'
   OR start_vertex.name = 'scope_3'
   OR start_vertex.name = 'scope_4'
   OR start_vertex.name = 'scope_5'
   OR start_vertex.name = 'scope_6'
   
   RETURN {
       properties: properties(start_vertex),
       ___edge_reserved: properties(null)
   }
   
   UNION
   
   MATCH (from:`scope` {hidden: false})
   -[e1:`edges`*0..5 {hidden: false}]->(to1:`role` {hidden: false})
   -[e2:`edges`*1..1 {hidden: false, fromCollection: 'role', toCollection: 
'permission'}]->(to2:`permission` {hidden: false})
   -[e3:`edges`*1..1 {hidden: false, fromCollection: 'permission', 
toCollection: 'resource'}]->(to3:`resource` {hidden: false})
   
   WHERE from.name = 'scope_1'
   OR from.name = 'scope_2'
   OR from.name = 'scope_3'
   OR from.name = 'scope_4'
   OR from.name = 'scope_5'
   OR from.name = 'scope_6'
   
   WITH
   collect({ properties: properties(to1), ___edge_reserved: 
properties(last(e1)) })
   + collect({ properties: properties(to2), ___edge_reserved: 
properties(last(e2)) })
   + collect({ properties: properties(to3), ___edge_reserved: 
properties(last(e3)) }) as result
   
   UNWIND result as result_out
   RETURN DISTINCT result_out
   
   LIMIT 1000
   $$) as (properties ag_catalog.agtype);
   ```
   
   As you can see we use only one table (e_label) for edges and structures like
   ```
   {hidden: false, fromCollection: 'role', toCollection: 'permission'}
   ```
   improve the execution time because there is a call to a GIN index that cuts 
unnecessary edges. That also helps simplify backend logic.
   
   So, such a query:
   ```
   select properties from ag_catalog.cypher('test_graph',
                                            $$
   //EXPLAIN ANALYZE
   MATCH (from:`domain` {hidden: false})-[any_edge:`edges`*1..10 {hidden: 
false, fromCollection: 'domain', toCollection: 'domain', relation: 
'managed'}]->(to:`domain` {hidden: false, id: 'domain_root_1'})
   WITH from, any_edge, to, head(any_edge) AS edge_check_in, head(any_edge) AS 
edge_result_in
   
   RETURN DISTINCT {
       properties: properties(from),
       ___edge_reserved: properties(edge_result_in)
   }
   LIMIT 1000
   
   $$) as (properties ag_catalog.agtype);
   
   ```
   works even faster than the version with lots of edge tables.
   ```
   select properties from ag_catalog.cypher('test_graph',
                                            $$
   //EXPLAIN ANALYZE
   MATCH (from:`domain` {hidden: 
false})-[any_edge:`E_DOMAIN_MANAGED_DOMAIN`*1..10 {hidden: 
false}]->(to:`domain` {hidden: false, id: 'domain_root_1'})
   WITH from, any_edge, to, head(any_edge) AS edge_check_in, head(any_edge) AS 
edge_result_in
   
   RETURN DISTINCT {
       properties: properties(from),
       ___edge_reserved: properties(edge_result_in)
   }
   LIMIT 1000
   
   $$) as (properties ag_catalog.agtype);
   ``` 
   


-- 
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



[GitHub] [age] CapnSpek commented on issue #1219: MERGE does not set properties involving variables

2023-09-18 Thread via GitHub


CapnSpek commented on issue #1219:
URL: https://github.com/apache/age/issues/1219#issuecomment-1723262498

   The same query also fails if instead of an array, we have any other datatype.
   
   If the setup is changed to
   ...
   SELECT * FROM cypher('xyz',
   $$
   CREATE (x:Label1{arr:[1,2,3,4]})
   RETURN x 
   $$) as (a agtype);
   ...
   
   And the query to:
   ```
   SELECT * FROM cypher('xyz', 
   $$
   MATCH (x:Label1{arr:[1,2,3,4]})
   MERGE (y:Label2{key1:2, key2:x.arr, key3:3})
   RETURN y
   $$) as (a agtype);
   ```
   
   The return value is still
   `{"id": 1125899906842643, "label": "Label2", "properties": {"key1": 2, 
"key3": 3}}::vertex`
   


-- 
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



[GitHub] [age] CapnSpek commented on issue #1219: MERGE does not set properties involving variables

2023-09-18 Thread via GitHub


CapnSpek commented on issue #1219:
URL: https://github.com/apache/age/issues/1219#issuecomment-1723217422

   Some observations:
   
   - The same query with `CREATE` instead of `MERGE` works just fine
   ```
   SELECT * FROM cypher('xyz', 
   $$
   MATCH (x:Label1{arr:[1,2,3,4]})
   CREATE (y:Label2{key1:2, key2:x.arr, key3:3})
   RETURN y
   $$) as (a agtype);
   ```
   
   - The same query with `MERGE` twice also works just fine
   ```
   SELECT * FROM cypher('xyz', 
   $$
   MATCH (x:Label1{arr:[1,2,3,4]})
   MERGE (y:Label2{key1:2, key2:x.arr, key3:3})
   MERGE (z:Label2{key1:2, key2:x.arr, key3:3})
   RETURN y
   $$) as (a agtype);
   ```
   
   Next, let us analyze the Query Plan Trees for `MATCH`-`MERGE`, 
`MATCH`-`CREATE`, and `MATCH`-`MERGE`-`MERGE` queries.
   
   - Query plan for `MATCH`-`MERGE`:
   ```
Custom Scan (Cypher Merge)  (cost=0.00..0.00 rows=0 width=32)
  ->  Subquery Scan on _age_default_alias_previous_cypher_clause  
(cost=0.00..86.02 rows=1 width=32)
->  Nested Loop Left Join  (cost=0.00..86.00 rows=1 width=96)
  Join Filter: (z.properties @> agtype_build_map('key1'::text, 
'2'::agtype, 'key2'::text, agtype_access_operator(VARIADIC 
ARRAY[_agtype_build_vertex(x.id, _label_name('18201'::oid, x.id), x.
   properties), '"arr"'::agtype]), 'key3'::text, '3'::agtype))
  ->  Seq Scan on "Label1" x  (cost=0.00..31.00 rows=1 width=40)
Filter: (properties @> agtype_build_map('arr'::text, 
agtype_build_list('1'::agtype, '2'::agtype, '3'::agtype, '4'::agtype)))
  ->  Seq Scan on "Label2" z  (cost=0.00..28.00 rows=1200 
width=64)
   (7 rows)
   ```
   
   - Query plan for `MATCH`-`CREATE`:
   ```
Custom Scan (Cypher Create)  (cost=0.00..0.00 rows=0 width=32)
  ->  Subquery Scan on _age_default_alias_previous_cypher_clause  
(cost=0.00..31.03 rows=1 width=32)
->  Seq Scan on "Label1" x  (cost=0.00..31.02 rows=1 width=160)
  Filter: (properties @> agtype_build_map('arr'::text, 
agtype_build_list('1'::agtype, '2'::agtype, '3'::agtype, '4'::agtype)))
   (4 rows)
   ```
   
   - Query plan for `MATCH`-`MERGE`-`MERGE`:
   ```
Custom Scan (Cypher Merge)  (cost=0.00..0.00 rows=0 width=32)
  ->  Subquery Scan on _age_default_alias_previous_cypher_clause  
(cost=0.00..49.02 rows=1 width=32)
->  Nested Loop Left Join  (cost=0.00..49.01 rows=1 width=160)
  Join Filter: (z.properties @> agtype_build_map('key1'::text, 
'2'::agtype, 'key2'::text, agtype_access_operator(VARIADIC 
ARRAY[_age_default_alias_previous_cypher_clause_1.x, '"arr"'::agtype
   ]), 'key3'::text, '3'::agtype))
  ->  Custom Scan (Cypher Merge)  (cost=0.00..0.00 rows=0 
width=64)
->  Subquery Scan on 
_age_default_alias_previous_cypher_clause_1  (cost=0.00..86.02 rows=1 width=64)
  ->  Nested Loop Left Join  (cost=0.00..86.01 
rows=1 width=96)
Join Filter: (y.properties @> 
agtype_build_map('key1'::text, '2'::agtype, 'key2'::text, 
agtype_access_operator(VARIADIC ARRAY[_agtype_build_vertex(x.id, 
_label_name('1820
   1'::oid, x.id), x.properties), '"arr"'::agtype]), 'key3'::text, '3'::agtype))
->  Seq Scan on "Label1" x  
(cost=0.00..31.00 rows=1 width=40)
  Filter: (properties @> 
agtype_build_map('arr'::text, agtype_build_list('1'::agtype, '2'::agtype, 
'3'::agtype, '4'::agtype)))
->  Seq Scan on "Label2" y  
(cost=0.00..28.00 rows=1200 width=64)
  ->  Seq Scan on "Label2" z  (cost=0.00..28.00 rows=1200 
width=64)
   (12 rows)
   ```
   
   Cannot draw a conclusion but maybe it has something to do with this part:
   `agtype_access_operator(VARIADIC ARRAY[_agtype_build_vertex(x.id, 
_label_name('18201'::oid, x.id), x.
   properties)`
   
   @ksheroz What do you think?


-- 
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