GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Reimplement list comprehension by MuhammadTahaNaveed · Pull Request #2169 · apache/age

Conversation

@MuhammadTahaNaveed

@MuhammadTahaNaveed MuhammadTahaNaveed commented Apr 27, 2025

Copy link
Copy Markdown
Member
  • Reimplement list comprehension to use ARRAY sublink.
  • Some test results were not correct. All the test results that are
    modified are correct and are verified with neo4j.
  • Also resolves the issue of using list comprehension in MERGE clause (List comprehension as property constraint of MERGE clause errors out #1611 )
    and issue Server crashes when executing SELECT * FROM cypher('list_comprehension' ...) #1850.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

jrgemignani reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
MuhammadTahaNaveed added 5 commits April 25, 2025 22:18
@MuhammadTahaNaveed
Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094
8d4915f
)"

This reverts commit 0f0d9be.
@MuhammadTahaNaveed
Revert "Fix error using list comprehension with WITH * (apache#1838)"
c3cd1e1
This reverts commit 5e08a2f.
@MuhammadTahaNaveed
Revert "Fix shift/reduce conflict in grammar (apache#1719)"
686512d
This reverts commit fab3119.
@MuhammadTahaNaveed
Revert "Implement list comprehension (apache#1610)"
cb0de5a
This reverts commit 3b2b394.
@MuhammadTahaNaveed
Reimplement list comprehension
acd1046
- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850
@github-actions github-actions Bot added master override-stale To keep issues/PRs untouched from stale action labels Apr 27, 2025
This was linked to issues Apr 27, 2025
List comprehension as property constraint of MERGE clause errors out #1611
Closed
Server crashes when executing SELECT * FROM cypher('list_comprehension' ...) #1850
Closed
List comprehensions #105
Closed
@MuhammadTahaNaveed

MuhammadTahaNaveed commented Apr 27, 2025

Copy link
Copy Markdown
Member Author

CI failure is due to #2163

jrgemignani reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MuhammadTahaNaveed
MuhammadTahaNaveed force-pushed the lc-revamp branch from 127f0be to c912e92 Compare April 29, 2025 20:15
@MuhammadTahaNaveed
Add expression tree walkers for cypher nodes
ae2b956
- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
@MuhammadTahaNaveed
MuhammadTahaNaveed force-pushed the lc-revamp branch from c912e92 to ae2b956 Compare May 1, 2025 17:43
jrgemignani
jrgemignani approved these changes Jun 10, 2025
View reviewed changes
@jrgemignani
jrgemignani merged commit 1251096 into apache:master Jun 10, 2025
@MuhammadTahaNaveed
MuhammadTahaNaveed deleted the lc-revamp branch June 11, 2025 15:47
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
90cab71
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
099dd97
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
2583c7a
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
0b32310
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
2dc3140
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
8bd6a5d
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
d1bd110
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
940f65b
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit to MuhammadTahaNaveed/age that referenced this pull request Jun 11, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (apache#2169)
9772a70
* Revert "Fix issue 1955 - List comprehension in WHERE clause (apache#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (apache#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (apache#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (apache#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
jrgemignani pushed a commit that referenced this pull request Jun 17, 2025
@MuhammadTahaNaveed @jrgemignani
Reimplement list comprehension (#2169)
489e49f
* Revert "Fix issue 1955 - List comprehension in WHERE clause (#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
jrgemignani pushed a commit that referenced this pull request Jun 17, 2025
@MuhammadTahaNaveed @jrgemignani
Reimplement list comprehension (#2169)
c2faa13
* Revert "Fix issue 1955 - List comprehension in WHERE clause (#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
jrgemignani pushed a commit that referenced this pull request Jun 17, 2025
@MuhammadTahaNaveed @jrgemignani
Reimplement list comprehension (#2169)
a6e33d5
* Revert "Fix issue 1955 - List comprehension in WHERE clause (#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
jrgemignani pushed a commit that referenced this pull request Jun 17, 2025
@MuhammadTahaNaveed
Reimplement list comprehension (#2169) (#2188)
99f2c23
* Revert "Fix issue 1955 - List comprehension in WHERE clause (#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.
MuhammadTahaNaveed added a commit that referenced this pull request Aug 1, 2025
@jrgemignani @uhayat
@MuhammadTahaNaveed @x4m @Munmud
Master to PostgreSQL version 17 (#2197)
d336d6d
Conflicts:
	.asf.yaml
	.github/workflows/installcheck.yaml

Changes to be committed:

	modified:   .asf.yaml
	modified:   .github/labeler.yml
	modified:   .github/workflows/installcheck.yaml
	modified:   README.md
	modified:   docker/Dockerfile
	modified:   docker/Dockerfile.dev
	modified:   drivers/docker-compose.yml
	modified:   src/backend/nodes/ag_nodes.c
	modified:   src/backend/parser/cypher_analyze.c

* Add support for PG17 (#2130)

- A new node type is introduced for JSON support, that is
  JsonConstructorExpr - wrapper over FuncExpr/Aggref/WindowFunc for
  SQL/JSON constructors.
- Added additional checks for JsonConstructorExpr expression node for
  which the walker would crash.
- Removed palloc0fast function call (which is not available in PG17)

* Update CI, README and repo settings for PG17 (#2156)

- Currently, all workflows are targeting the `PG17_prepare` branch,
  which will be changed to `PG17` once the branch is renamed.
- Updated all the github workflows
- Updated the README
- Updated repo settings
- Updated the Dockerfiles

* Remove stale bot and update .asf.yaml settings (#2171)

- Removed stale bot.
  (https://lists.apache.org/thread/qh4h2z6hsjy2v7wg8mwfnl6cbjp28y08)
- Decrease required PR approvals by one.
  (https://lists.apache.org/thread/kmz155t6k0h3b26fjpz36924zthqjlpm)
- Fixed a warning reported by apache infra i.e.
  "An error occurred while processing the github
   feature in .asf.yaml: GitHub discussions can
   only be enabled if a mailing list target exists
   for it."

* Update labeler.yml

Adjust workflow/labeler.yml to add permissions.

* Adjust CI for PG17 after rename from PG17_prepare (#2182)

Adjusted the following CI files (workflows) for PG17, they
originally pointed to PG17_prepare -

modified:   .github/workflows/go-driver.yml
modified:   .github/workflows/installcheck.yaml
modified:   .github/workflows/jdbc-driver.yaml
modified:   .github/workflows/nodejs-driver.yaml
modified:   .github/workflows/python-driver.yaml
modified:   drivers/docker-compose.yml
modified:   .github/labeler.yml

* Reimplement list comprehension (#2169) (#2188)

* Revert "Fix issue 1955 - List comprehension in WHERE clause (#2094)"

This reverts commit 0f0d9be.

* Revert "Fix error using list comprehension with WITH * (#1838)"

This reverts commit 5e08a2f.

* Revert "Fix shift/reduce conflict in grammar (#1719)"

This reverts commit fab3119.

* Revert "Implement list comprehension (#1610)"

This reverts commit 3b2b394.

* Reimplement list comprehension

- Reimplement list comprehension to use ARRAY sublinks.
- Some test results were not correct. All the test results that are
  modified are correct and are verified with neo4j.
- Also resolves the issue of using list comprehension in MERGE clause (1611)
  and issue 1850

* Add expression tree walkers for cypher nodes

- Added cypher_raw_expr_tree_walker and cypher_expr_tree_walker, based
  on Postgres's raw_expression_tree_walker and expression_tree_walker.
  These follow the same walker API as Postgres and add support for
  Cypher-specific nodes.
- Also added the agtype[] to agtype func and typecast to 1.5.0-y.y.y.sql
- Simplifies logic for cypher_subquery handling in where clause.
- Fixes a crash when list comprehension in the WHERE clause references a
  variable from the preceding MATCH clause.

* Add support for operators in cypher query (#2172)

- Fixed some operator signatures in .sql
- Added support for PG operators in cypher. Some
  hardcoded operators are removed, since they are
  now covered by the general operator handling.
- Added full typecast syntax that allows for type
  modifiers.
- These changes also improve interoperability with
  other extensions, as reflected in the regression
  tests.
- Added a new function to check if graph_oid exists.

* Prevent object access hook from accesing not installed namespace (#2161)

Currently we cannot install Age to shared_preload_libraries if
pg_cron is installed.

To prevent following error we must bail out early.
postgres=# set backtrace_functions to 'get_namespace_oid';
SET
postgres=# create extension pg_cron ;
2025-04-15 16:59:49.867 +05 [30402] ERROR:  schema "ag_catalog" does not exist
2025-04-15 16:59:49.867 +05 [30402] BACKTRACE:
	2   postgres                            0x0000000102401ab0 get_namespace_oid + 204
	3   age.so                              0x0000000103285cd0 ag_catalog_namespace_id + 28
	4   age.so                              0x00000001032846fc ag_relation_id + 32
	5   age.so                              0x00000001032efe9c search_label_relation_cache_miss + 84
	6   age.so                              0x00000001032efe30 search_label_relation_cache + 100
	7   age.so                              0x00000001032842f4 object_access + 384
	8   postgres                            0x000000010240a7a0 RunObjectDropHook + 136
	9   postgres                            0x00000001023ee85c deleteOneObject + 108
	10  postgres                            0x00000001023eb860 deleteObjectsInList + 476
	11  postgres                            0x00000001023eba14 performMultipleDeletions + 316
	12  postgres                            0x0000000102560244 ATPostAlterTypeCleanup + 2144
	13  postgres                            0x0000000102559fb4 ATRewriteCatalogs + 516
	14  postgres                            0x00000001025543a8 ATController + 284
	15  postgres                            0x00000001025541bc AlterTable + 96
	16  postgres                            0x00000001028b8240 ProcessUtilitySlow + 1812
	17  postgres                            0x00000001028b600c standard_ProcessUtility + 3684
	18  age.so                              0x00000001032844f8 ag_ProcessUtility_hook + 200
	19  postgres                            0x00000001028b516c ProcessUtility + 392
	20  postgres                            0x000000010250e5b4 execute_sql_string + 812
	21  postgres                            0x000000010250d438 execute_extension_script + 2264
	22  postgres                            0x000000010250b330 ApplyExtensionUpdates + 1320
	23  postgres                            0x0000000102507954 CreateExtensionInternal + 1896
	24  postgres                            0x0000000102506ea4 CreateExtension + 1152
	25  postgres                            0x00000001028b8ed4 ProcessUtilitySlow + 5032
	26  postgres                            0x00000001028b600c standard_ProcessUtility + 3684
	27  age.so                              0x00000001032844f8 ag_ProcessUtility_hook + 200
	28  postgres                            0x00000001028b516c ProcessUtility + 392
	29  postgres                            0x00000001028b4768 PortalRunUtility + 232
	30  postgres                            0x00000001028b3660 PortalRunMulti + 756
	31  postgres                            0x00000001028b2abc PortalRun + 1008
	32  postgres                            0x00000001028ad870 exec_simple_query + 1436
	33  postgres                            0x00000001028ac990 PostgresMain + 2472
	34  postgres                            0x00000001027a49ac report_fork_failure_to_client + 0
	35  postgres                            0x00000001027a3e54 BackendStartup + 520
	36  postgres                            0x00000001027a29f0 ServerLoop + 812
	37  postgres                            0x000000010279fe0c PostmasterMain + 6484
	38  postgres                            0x000000010266acd0 startup_hacks + 0
	39  dyld                                0x000000018a3ab154 start + 2476

* Fix CSV import for edge with one property (#2175)

- start_index marks where property fields begin. For edges, it's 4.
  If start_index >= total_fields, create empty properties; otherwise,
  parse the properties.

---------

Co-authored-by: Umar Hayat <[email protected]>
Co-authored-by: Muhammad Taha Naveed <[email protected]>
Co-authored-by: Andrey Borodin <[email protected]>
Co-authored-by: Moontasir Mahmood <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jrgemignani jrgemignani jrgemignani approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

master override-stale To keep issues/PRs untouched from stale action

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Server crashes when executing SELECT * FROM cypher('list_comprehension' ...) List comprehension as property constraint of MERGE clause errors out List comprehensions

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@MuhammadTahaNaveed @jrgemignani
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.