Re: [DISCUSS] Apache AGE 1.5.0 Release for PostgreSQL 12

2024-03-05 Thread Dehowe Feng
Look good. Excited to have this release.

On Sat, Mar 2, 2024 at 4:25 AM Muhammad Taha Naveed
 wrote:

> Looks good to me. Checked links, signatures, git tag and release notes.
>
> Regards
> Muhammad Taha Naveed
>
> On Thu, Feb 29, 2024 at 6:34 AM John Gemignani  >
> wrote:
>
> > Dear Apache Community,
> >
> > We would like to open a discussion for the Apache AGE release 1.5.0 for
> > PostgreSQL 12.
> >
> > 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 12
> >
> > Apache AGE 1.5.0 - Release Notes
> >
> > NOTE: Due to the complexity and the amount of additions, 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.
> >
> > 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 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)
> > 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)
> >
> > *
> >
> > The git tag to be discussed and voted on:
> > https://github.com/apache/age/releases/tag/PG12/v1.5.0-rc0
> >
> > The git commit hash:
> > commit 033a3c563b16ce9a12318cd09d0a5981e6c52225
> >
> > The release files for 1.5.0, can be found at:
> > https://dist.apache.org/repos/dist/dev/age/PG12/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/PG12/v1.5.0-rc0
> >
> > Please verify the above links, files, and signatures in addition to
> sharing
> > your thoughts and feedback and if we can call for a vote.
> >
> > Thank you for your time.
> >
> > John Gemignani
> >
>


Re: [I] Unable to drop column from vlabel tables [age]

2024-03-05 Thread via GitHub


mingfang closed issue #1639: Unable to drop column from vlabel tables 
URL: https://github.com/apache/age/issues/1639


-- 
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] Unable to drop column from vlabel tables [age]

2024-03-05 Thread via GitHub


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

   @mingfang I wish I could help you more here. However, this part (fts) is out 
of my area of expertise. I will just mention that the link provided shows 
CALL/YIELD which are Cypher commands. 


-- 
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] Unable to drop column from vlabel tables [age]

2024-03-05 Thread via GitHub


mingfang commented on issue #1639:
URL: https://github.com/apache/age/issues/1639#issuecomment-1979625699

   I am trying to implement searching on graph data.
   https://neo4j.com/developer/kb/fulltext-search-in-neo4j/


-- 
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] Unable to drop column from vlabel tables [age]

2024-03-05 Thread via GitHub


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

   @mingfang I'm not following what you want to, or are expecting to do. 
   
   That being said, from what it _looks like to me_, I get the impression that 
you are trying to work with the graph data (graphs/nodes/edges) as relational 
database data (tables/rows/columns) instead of as graph data. You need to think 
of the graph data as graph data and use graph structures and commands to 
represent and retrieve what you want. This may mean rethinking your graph's 
structure so that it represents what you want.
   
   A few notes on graph structures that might be helpful, if you aren't aware 
of them already -
   
   - A graph is a collection of nodes and edges (should be obvious, but worth 
saying to be complete).
   - A node (or vertex) is usually an object or thing. It can contain 0 to any 
number of properties to describe it.
   - An edge (or sometimes called a relationship) is usually a relationship or 
path between 2 nodes. It can contain 0 to any number of properties to describe 
it.
   - A node can have 0 to an infinite number of edges. These edges could be of 
many differing relationships. 
   - An edge always has a direction and always connects just 2 nodes.
   - Apache AGE is a directed property graph meaning that all edges have a 
direction and all components have properties. Components being nodes and edges.
   
   With AGE it is possible to combine SQL and Cypher and mix relational and 
graph. But, you should avoid modifying the underlaying graph data as it can 
potentially cause data corruption.
   
   If you want to add another column to a node/edge you can add that data 
inside the properties for that node/edge. Or, you could create an edge, back to 
itself with that data. That is just an example, and likely a bad one as it is a 
loop. Loops can have consequences for open ended graph transversals.


-- 
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] Unable to drop column from vlabel tables [age]

2024-03-05 Thread via GitHub


mingfang commented on issue #1639:
URL: https://github.com/apache/age/issues/1639#issuecomment-1979360630

   Yes I can respect that perspective.
   My use case is to integrate AGE with native Postgres FTS.
   Here is what I have working so far.
   ```sql
   CREATE EXTENSION IF NOT EXISTS age;
   
   LOAD 'age';
   SET search_path = ag_catalog, "$user", public;
   
   SELECT * FROM ag_catalog.drop_graph('movie_recommendation', true);
   SELECT * FROM ag_catalog.create_graph('movie_recommendation');
   
   SELECT * from cypher('movie_recommendation', $$
   CREATE 
   (:User {id: 'user1'}),
   (:User {id: 'user2'}),
   (:Movie {id: 'movie1', name: 'The Shawshank Redemption'}),
   (:Movie {id: 'movie2', name: 'The Godfather'}),
   (:Movie {id: 'movie3', name: 'The Dark Knight'}),
   (:Movie {id: 'movie4', name: 'Army of Thieves'}),
   (:Movie {id: 'movie5', name: 'Oceans Thirteen'}),
   (:Movie {id: 'movie6', name: 'Heat'}),
   (:Genre {name: 'Drama'}),
   (:Genre {name: 'Crime'}),
   (:Genre {name: 'Action'})
   $$) as (V agtype);
   
   SELECT * from cypher('movie_recommendation', $$
   
   MATCH 
   (u1:User {id: 'user1'}), 
   (u2:User {id: 'user2'}), 
   (m1:Movie {id: 'movie1'}),
   (m2:Movie {id: 'movie2'}),
   (m3:Movie {id: 'movie3'}),
   (m4:Movie {id: 'movie4'}),
   (m5:Movie {id: 'movie5'}),
   (m6:Movie {id: 'movie6'}),
   (gD:Genre {name: 'Drama'}),
   (gC:Genre {name: 'Crime'}),
   (gA:Genre {name: 'Action'})
   
   CREATE 
   (u1)-[:WATCHED]->(m1),
   (u1)-[:WATCHED]->(m2),
   (u2)-[:WATCHED]->(m1),
   (m1)-[:BELONGS_TO]->(gD),
   (m2)-[:BELONGS_TO]->(gC),
   (m3)-[:BELONGS_TO]->(gA),
   (m4)-[:BELONGS_TO]->(gD),
   (m5)-[:BELONGS_TO]->(gC),
   (m6)-[:BELONGS_TO]->(gA)
   
   $$) as (V agtype);
   
   ALTER TABLE movie_recommendation."Movie" ADD COLUMN ts tsvector
   GENERATED ALWAYS AS (
   to_tsvector('english', ag_catalog.agtype_access_operator(properties, 
'"name"'::ag_catalog.agtype)::text)
   ) STORED;
   CREATE INDEX ts_idx ON movie_recommendation."Movie" USING GIN (ts);
   
   SELECT *, ts_rank(ts, websearch_to_tsquery('english', 'dark')) AS rank 
   FROM movie_recommendation."Movie" 
   WHERE ts @@ websearch_to_tsquery('english', 'dark');
   ```
   
   The alternative to adding the auto generated column is the add a trigger to 
write to a non-AGE table.
   I think searching, both FTS and vector/embedding based search, are huge in 
the gen-ai era and I'm hoping AGE can support for it.
   What do you recommend as an alternative?


-- 
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] Unable to drop column from vlabel tables [age]

2024-03-05 Thread via GitHub


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

   @mingfang AGE does not support users manually manipulating AGE created/owned 
tables. You do this at your own risk.


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