Skip to content

Conversation

@jrgemignani
Copy link
Contributor

@jrgemignani jrgemignani commented Jul 11, 2023

** PLEASE DO NOT MERGE ** until thoroughly reviewed and approved by all reviewers. Reviewers must state their approval as a comment in the thread below. Additionally, this merge needs to be appropriately squashed before merging.

PR for moving the master branch up to PostgreSQL version 13.

It contains all of the latest work in the master branch in addition to all of the changes made to go from PostgreSQL version 12 to 13. When this PR is merged the master will be the latest and on PostgreSQL version 13.

Everyone listed as a reviewer needs to review this PR

muhammadshoaib and others added 30 commits August 24, 2022 08:35
This is an initial version of AGE for PG12.

Co-authored-by: Alex Kwak <emotionbug@apache.org>
Co-authored-by: Ibrar Ahmad <ibrar.ahmed@percona.com>
Co-authored-by: Josh Innis <JoshInnis@gmail.com>
Co-authored-by: John Gemignani <jrgemignani@gmail.com>
This is a patch to remove the word incubate from AGE for PG12
Updated the README and RELEASE files.
Co-authored-by: Ibrar Ahmed <“ibrar.ahmed@percona.com”>
Added the ability to pass parameters to the cypher() function via
a function called age_prepare_cypher().

This extra function is necessary because the cypher() function itself
isn't actually executed - it is instead transformed and replaced. This
means that it needs to have its input parameters resolved prior to
that transform. However, parameters aren't resolved until the
execution phase. So, another command to resolve them needs to run
prior to the cypher() function call.

This mainly impacts the drivers, which will need to be updated.

Additionally, modified the golang driver as an example of this new
usage.

Added regression tests.
Modified the python driver to pass parameters to the cypher() function
via age_prepare_cypher()

Modified README for the python driver
Temporary update to show diffs.
Temporary change to view regression errors.
Temporary installcheck test
Temporary installcheck for debugging
On regression test failure, dump the failure to the log.
Fixed compare_agtype_scalar_values returned result. It used a
function, varstr_cmp, that wasn't guaranteed to return 1, 0, or -1.
It was only guaranteed to return >0, 0, or <0. This caused some
builds to fail during the regression tests, as 1, 0, or -1 were
expected.
This change will implement running of the go driver unit tests
upon every pull commit made to the `drivers/golang` code.

It uses the `paths` directive to ensure the github action workflow
only runs when the go driver code is changed.

The docker-compose file is required to instaniate a postgres
instance, needed for unit testing.
* Update to go version 1.19, as 1.16 is EOL

The current version of the driver is 1.16 which went EOL Feb 2021

This upgrades to 1.19 and also configures CI to retrospectively
test back to 1.18 (1.17 is EOL). This will give test coverage
for all actively supported go versions.

* Also update readme go version
* Fixed a bug where python driver throws error when build from source

* Moved required packages to requirements.txt

* Update Readme

Rearranged instructions and added instructions to install from requirements.txt

* Fixed a typo in exceptions.py file

Fixed a typo 'SqlExcution' on line 62 in exceptions.py file
* Fixed a bug where python driver throws error when build from source

* Moved required packages to requirements.txt

* Update Readme

Rearranged instructions and added instructions to install from requirements.txt

* Fixed a typo in exceptions.py file

Fixed a typo 'SqlExcution' on line 62 in exceptions.py file
    modified:   Makefile
    modified:   README.md
    modified:   RELEASE
    renamed:    age--1.1.0.sql -> age--1.1.1.sql
    modified:   age.control
    modified:   NOTICE
    modified:   RELEASE
    new file:   age--1.1.0--1.1.1.sql
Queries can now call functions using the form CALL ... YIELD.

CALL ... YIELD can be used in some of the following forms:

    Individual:
    CALL
    CALL YIELD
    CALL YIELD WHERE UPDATE/RETURN

    Subqueries:
    READING_CLAUSE CALL YIELD UPDATE/RETURN
    CALL YIELD READING_CLAUSE UPDATE/RETURN

In the future, CALL YIELD support for record returning functions and
multiple variable output functions can be added.

Known Issue with WHERE clause where a WHERE in a MATCH + CALL subquery
does not filter results is known.

Co-authored-by: Dehowe Feng <dehowefeng@gmail.com>
Conflicts:
	README.md

Co-authored-by: John Gemignani <jrgemignani@gmail.com>
Typo fix where an if statement check was causing a logic error that
caused the where statement to be ignored.

Regression tests added to address this and thoroughly check WHERE
clauses as well.

Co-authored by: John Gemignani <jrgemignani@gmail.com>
Fixed the EXPLAIN command to allow for nested cypher commands within
more complex SQL queries.
Fixed the delete_global_graphs function. It was not keeping track of
the previous graph global context pointer.

This was causing a memory leak for multiple graph contexts if
individual graphs were deleted.
Updated the behavior of invalid labels to return NULL rather than
throw an error.

Added additional regression tests as well.
MuhammadTahaNaveed and others added 2 commits March 30, 2023 09:22
- Removed external links from readme.
- Updated version to 1.0.0
    modified:   Makefile
    modified:   README.md
    modified:   RELEASE
    deleted:    age--1.1.0--1.1.1.sql
    renamed:    age--1.1.1.sql -> age--1.3.0.sql
    modified:   age.control

Note: There isn't a need for an upgrade script as this is a new
      version release.
@jrgemignani
Copy link
Contributor Author

jrgemignani commented Jul 11, 2023

Updated PR description, please read.

@jrgemignani jrgemignani force-pushed the master_PostgreSQL13 branch 2 times, most recently from 7059521 to e53c1b3 Compare July 11, 2023 17:57
@jrgemignani
Copy link
Contributor Author

jrgemignani commented Jul 11, 2023

Updated all mentioned issues. Please review.

Copy link
Member

@dehowef dehowef left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job with the NSI changes. Looks good to me.

@eyab
Copy link
Member

eyab commented Jul 11, 2023

Looks good to me. Great work.

@muhammadshoaib
Copy link
Contributor

Thanks John, Look good to me.

Copy link
Member

@MuhammadTahaNaveed MuhammadTahaNaveed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added some questions/suggestions. Otherwise, looks good to me 👍🏻 .

Copy link
Contributor

@muhammadshoaib muhammadshoaib left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look goods to me. Just on a note please, create PG12 branch before merging this into master. Thanks.

Conflicts:
	.github/workflows/go-driver.yml
	.github/workflows/jdbc-driver.yaml
	.github/workflows/nodejs-driver.yaml
	.github/workflows/python-driver.yaml
	.github/workflows/installcheck.yaml
	.gitignore
	Dockerfile
	README.md
	RELEASE
	age--1.3.0.sql
	drivers/README
	drivers/docker-compose.yml
	drivers/golang/README.md
	drivers/golang/age/builder.go
	drivers/golang/age/mapper.go
	drivers/golang/go.mod
	drivers/golang/go.sum
	drivers/golang/parser/README.md
	drivers/jdbc/README.md
	drivers/jdbc/lib/build.gradle.kts
	drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
	drivers/nodejs/README.md
	drivers/python/README.md
	drivers/python/age/age.py
	drivers/python/age/exceptions.py
	drivers/python/setup.py
	drivers/python/test_age_py.py
	regress/expected/age_global_graph.out
	regress/expected/catalog.out
	regress/expected/cypher_call.out
	regress/expected/cypher_match.out
	regress/expected/cypher_merge.out
	regress/expected/cypher_set.out
	regress/sql/age_global_graph.sql
	regress/sql/catalog.sql
	regress/sql/cypher_call.sql
	regress/sql/cypher_match.sql
	regress/sql/cypher_set.sql
	src/backend/commands/label_commands.c
	src/backend/executor/cypher_create.c
	src/backend/executor/cypher_merge.c
	src/backend/executor/cypher_set.c
	src/backend/executor/cypher_utils.c
	src/backend/nodes/cypher_readfuncs.c
	src/backend/parser/cypher_analyze.c
	src/backend/parser/cypher_clause.c
	src/backend/parser/cypher_gram.y
	src/backend/utils/adt/agtype.c
	src/backend/utils/adt/graphid.c
	src/backend/utils/cache/ag_cache.c
	src/backend/utils/graph_generation.c
	src/backend/utils/load/ag_load_edges.c
	src/backend/utils/load/ag_load_labels.c
	src/include/nodes/cypher_nodes.h
@jrgemignani jrgemignani force-pushed the master_PostgreSQL13 branch from e53c1b3 to 66677fe Compare July 12, 2023 18:56
@jrgemignani jrgemignani merged commit f485846 into apache:master Jul 12, 2023
M4rcxs pushed a commit to M4rcxs/age that referenced this pull request Jul 18, 2023
Merged branch PG13 (version 1.3.0) into the master branch.

PR 1022 contains the merge of the branch PG13 (version 1.3.0) into
the master branch. This will fold in all of the changes that are
specific to the branch PG13 from the branch PG12, of which it originated. 
As the master branch is already ahead of version 1.3.0, it will create a 
master branch that is on PostgreSQL version 13 and completely up-to-date. 

    Note: Effective as of the merge of this PR, the master branch will be on
    PostgreSQL version 13.

On branch master_PostgreSQL13 the following files were modified to
correct conflicts, whitespace, typos, duplicates, and to add clarity -

        .github/workflows/go-driver.yml
        .github/workflows/jdbc-driver.yaml
        .github/workflows/nodejs-driver.yaml
        .github/workflows/python-driver.yaml
        .github/workflows/installcheck.yaml
        .gitignore
        Dockerfile
        README.md
        RELEASE
        age--1.3.0.sql
        drivers/README
        drivers/docker-compose.yml
        drivers/golang/README.md
        drivers/golang/age/builder.go
        drivers/golang/age/mapper.go
        drivers/golang/go.mod
        drivers/golang/go.sum
        drivers/golang/parser/README.md
        drivers/jdbc/README.md
        drivers/jdbc/lib/build.gradle.kts
        drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
        drivers/nodejs/README.md
        drivers/python/README.md
        drivers/python/age/age.py
        drivers/python/age/exceptions.py
        drivers/python/setup.py
        drivers/python/test_age_py.py
        regress/expected/age_global_graph.out
        regress/expected/catalog.out
        regress/expected/cypher_call.out
        regress/expected/cypher_match.out
        regress/expected/cypher_merge.out
        regress/expected/cypher_set.out
        regress/sql/age_global_graph.sql
        regress/sql/catalog.sql
        regress/sql/cypher_call.sql
        regress/sql/cypher_match.sql
        regress/sql/cypher_set.sql
        src/backend/commands/label_commands.c
        src/backend/executor/cypher_create.c
        src/backend/executor/cypher_merge.c
        src/backend/executor/cypher_set.c
        src/backend/executor/cypher_utils.c
        src/backend/nodes/cypher_readfuncs.c
        src/backend/parser/cypher_analyze.c
        src/backend/parser/cypher_clause.c
        src/backend/parser/cypher_gram.y
        src/backend/utils/adt/agtype.c
        src/backend/utils/adt/graphid.c
        src/backend/utils/cache/ag_cache.c
        src/backend/utils/graph_generation.c
        src/backend/utils/load/ag_load_edges.c
        src/backend/utils/load/ag_load_labels.c
        src/include/nodes/cypher_nodes.h
MuhammadTahaNaveed pushed a commit to MuhammadTahaNaveed/age that referenced this pull request Aug 24, 2023
Merged branch PG13 (version 1.3.0) into the master branch.

PR 1022 contains the merge of the branch PG13 (version 1.3.0) into
the master branch. This will fold in all of the changes that are
specific to the branch PG13 from the branch PG12, of which it originated. 
As the master branch is already ahead of version 1.3.0, it will create a 
master branch that is on PostgreSQL version 13 and completely up-to-date. 

    Note: Effective as of the merge of this PR, the master branch will be on
    PostgreSQL version 13.

On branch master_PostgreSQL13 the following files were modified to
correct conflicts, whitespace, typos, duplicates, and to add clarity -

        .github/workflows/go-driver.yml
        .github/workflows/jdbc-driver.yaml
        .github/workflows/nodejs-driver.yaml
        .github/workflows/python-driver.yaml
        .github/workflows/installcheck.yaml
        .gitignore
        Dockerfile
        README.md
        RELEASE
        age--1.3.0.sql
        drivers/README
        drivers/docker-compose.yml
        drivers/golang/README.md
        drivers/golang/age/builder.go
        drivers/golang/age/mapper.go
        drivers/golang/go.mod
        drivers/golang/go.sum
        drivers/golang/parser/README.md
        drivers/jdbc/README.md
        drivers/jdbc/lib/build.gradle.kts
        drivers/jdbc/lib/src/test/java/org/apache/age/jdbc/BaseDockerizedTest.java
        drivers/nodejs/README.md
        drivers/python/README.md
        drivers/python/age/age.py
        drivers/python/age/exceptions.py
        drivers/python/setup.py
        drivers/python/test_age_py.py
        regress/expected/age_global_graph.out
        regress/expected/catalog.out
        regress/expected/cypher_call.out
        regress/expected/cypher_match.out
        regress/expected/cypher_merge.out
        regress/expected/cypher_set.out
        regress/sql/age_global_graph.sql
        regress/sql/catalog.sql
        regress/sql/cypher_call.sql
        regress/sql/cypher_match.sql
        regress/sql/cypher_set.sql
        src/backend/commands/label_commands.c
        src/backend/executor/cypher_create.c
        src/backend/executor/cypher_merge.c
        src/backend/executor/cypher_set.c
        src/backend/executor/cypher_utils.c
        src/backend/nodes/cypher_readfuncs.c
        src/backend/parser/cypher_analyze.c
        src/backend/parser/cypher_clause.c
        src/backend/parser/cypher_gram.y
        src/backend/utils/adt/agtype.c
        src/backend/utils/adt/graphid.c
        src/backend/utils/cache/ag_cache.c
        src/backend/utils/graph_generation.c
        src/backend/utils/load/ag_load_edges.c
        src/backend/utils/load/ag_load_labels.c
        src/include/nodes/cypher_nodes.h
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.