Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: apache/age
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: master
Choose a base ref
...
head repository: apache/age
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: PG18
Choose a head ref
Checking mergeability… Don’t worry, you can still create the pull request.
  • 14 commits
  • 62 files changed
  • 5 contributors

Commits on Nov 19, 2025

  1. Updated CI, Labeler, Docker, and branch security files for PG18 (#2246)

    Updated the CI and Docker files for the PG18 branch to point to
    PG18 and PostgreSQL version 18.
    
    Updated the labeler and branch security files for PG18.
    
    Some of these only apply to the master branch but are updated
    for consistency.
    
    modified:   .asf.yaml
    modified:   .github/labeler.yml
    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:   docker/Dockerfile
    modified:   docker/Dockerfile.dev
    modified:   drivers/docker-compose.yml
    jrgemignani authored Nov 19, 2025
    Configuration menu
    Copy the full SHA
    399a289 View commit details
    Browse the repository at this point in the history

Commits on Nov 25, 2025

  1. PG18 port for AGE (#2251)

    * [PG18 port][Set1] Fix header dependencies and use TupleDescAttr macro
    
    - Include executor/executor.h for PG18 header reorganization and use 
      TupleDescAttr() accessor macro instead of direct attrs[] access.
    
    * [PG18 port][Set2] Adapt to expandRTE signature change and pg_noreturn
    
    - Add VarReturningType parameter to expandRTE() calls using VAR_RETURNING_DEFAULT.
    - Replace pg_attribute_noreturn() with pg_noreturn prefix specifier.
    
    * [PG18 port][Set3] Fix double ExecOpenIndices call for PG18 compatibility
    
    - PG18 enforces stricter assertions in ExecOpenIndices, requiring
      ri_IndexRelationDescs to be NULL when called.
    
    - In update_entity_tuple(), indices may already be opened by the
      caller (create_entity_result_rel_info), causing assertion failures.
    
    - Add a check to only open indices if not already open, and track
      ownership with a boolean flag to ensure we only close what we opened.
    
    - Found when regression tests failed with assertions, which this change
      resolves.
    
    * [PG18 port][Set4] Update regression test expected output for ordering
    
    PG18's implementation changes result in different row ordering for
    queries without explicit ORDER BY clauses. Update expected output
    files to reflect the new ordering while maintaining identical
    result content.
    
    * [PG18 port][Set5] Address review comments - coding standard fix
    
    Note: Assisted by GitHub Copilot Agent mode.
    kk-src authored Nov 25, 2025
    Configuration menu
    Copy the full SHA
    146bf38 View commit details
    Browse the repository at this point in the history

Commits on Dec 2, 2025

  1. Update CI for BaseDockerizedTest (#2254)

    Updated the CI BaseDockerizedTest to point to dev_snapshot_PG18
    jrgemignani authored Dec 2, 2025
    Configuration menu
    Copy the full SHA
    201399f View commit details
    Browse the repository at this point in the history
  2. Fix DockerHub build warning messages (#2252)

    PR fixes build warning messages on DockerHub and on my local build.
    
    No regression tests needed.
    
    modified:   src/include/nodes/ag_nodes.h
    modified:   src/include/optimizer/cypher_createplan.h
    modified:   src/include/optimizer/cypher_pathnode.h
    modified:   tools/gen_keywordlist.pl
    jrgemignani authored Dec 2, 2025
    Configuration menu
    Copy the full SHA
    f364664 View commit details
    Browse the repository at this point in the history

Commits on Dec 16, 2025

  1. Fix issue 2245 - Creating more than 41 vlabels causes crash in drop_g…

    …raph (#2248)
    
    Fixed issue 2245 - Creating more than 41 vlabels causes drop_grapth to fail
    with "label (relation) cache corrupted" and crashing out on the following
    command.
    
    This was due to corruption of the label_relation_cache during the HASH_DELETE
    process.
    
    As the issue was with a cache flush routine, it was necessary to fix them
    all. Here is the list of the flush functions that were fixed -
    
        static void flush_graph_name_cache(void)
        static void flush_graph_namespace_cache(void)
        static void flush_label_name_graph_cache(void)
        static void flush_label_graph_oid_cache(void)
        static void flush_label_relation_cache(void)
        static void flush_label_seq_name_graph_cache(void)
    
    Added regression tests.
    
    modified:   regress/expected/catalog.out
    modified:   regress/sql/catalog.sql
    modified:   src/backend/utils/cache/ag_cache.c
    jrgemignani authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    c176b57 View commit details
    Browse the repository at this point in the history
  2. Add index on id columns (#2117)

    - Whenever a label will be created, indices on id columns will be
      created by default. In case of vertex, a unique index on id column
      will be created, which will also serve as a unique constraint.
      In case of edge, a non-unique index on start_id and end_id columns
      will be created.
    
    - This change is expected to improve the performance of queries that
      involve joins. From some performance tests, it was observed that
      the performance of queries improved alot.
    
    - Loader was updated to insert tuples in indices as well. This has
      caused to slow the loader down a bit, but it was necessary.
    
    - A bug related to command ids in cypher_delete executor was also fixed.
    
    Resolved conflicts:
    	regress/expected/cypher_match.out
    	regress/expected/expr.out
    MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    2f36b1c View commit details
    Browse the repository at this point in the history
  3. Fix Issue 2256: segmentation fault when calling coalesce function (#2259

    )
    
    Fixed issue 2256: A segmentation fault occurs when calling the coalesce
    function in PostgreSQL version 17. This likely predates 17 and includes
    other similar types of "functions".
    
    See issues 1124 (PR 1125) and 1303 (PR 1317) for more details.
    
    This issue is due to coalesce() being processed differently from other
    functions. Additionally, greatest() was found to exhibit the same
    behavior. They were added to the list of types to ignore during the
    cypher analyze phase.
    
    A few others were added: CaseExpr, XmlExpr, ArrayExpr, & RowExpr.
    Although, I wasn't able to find cases where these caused crashes.
    
    Added regression tests.
    
    modified:   regress/expected/cypher.out
    modified:   regress/sql/cypher.sql
    modified:   src/backend/parser/cypher_analyze.c
    jrgemignani authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    1d9df48 View commit details
    Browse the repository at this point in the history
  4. Adjust 'could not find rte for' ERROR message (#2266)

    Adjusted the following type of error message. It was mentioned in
    issue 2263 as being incorrect, which it isn't. However, it did need
    some clarification added -
    
        ERROR:  could not find rte for <column name>
    
    Added a HINT for additional clarity -
    
        HINT:  variable <column name> does not exist within scope of usage
    
    For example:
    
        CREATE p0=(n0), (n1{k:EXISTS{WITH p0}}) RETURN 1
    
        ERROR:  could not find rte for p0
        LINE 3:     CREATE p0=(n0), (n1{k:EXISTS{WITH p0}})
                                                  ^
        HINT:  variable p0 does not exist within scope of usage
    
    Additionally, added pstate->p_expr_kind == EXPR_KIND_INSERT_TARGET to
    transform_cypher_clause_as_subquery.
    
    Updated existing regression tests.
    Added regression tests from issue.
    
    modified:   regress/expected/cypher_call.out
    modified:   regress/expected/cypher_subquery.out
    modified:   regress/expected/cypher_union.out
    modified:   regress/expected/cypher_with.out
    modified:   regress/expected/expr.out
    modified:   regress/expected/list_comprehension.out
    modified:   regress/expected/scan.out
    modified:   src/backend/parser/cypher_clause.c
    modified:   src/backend/parser/cypher_expr.c
    jrgemignani authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    2ccdc6b View commit details
    Browse the repository at this point in the history
  5. Fix possible memory and file descriptors leaks (#2258)

    - Used postgres memory allocation functions instead of standard ones.
    - Wrapped main loop of csv loader in PG_TRY block for better error handling.
    ZigzagAK authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    419eb13 View commit details
    Browse the repository at this point in the history
  6. Fix ORDER BY alias resolution with AS in Cypher queries (#2269)

    NOTE: This PR was partially created with AI tools and reviewed by a human.
    
    ORDER BY clauses failed when referencing column aliases from RETURN:
    
        MATCH (p:Person) RETURN p.age AS age ORDER BY age DESC
        ERROR: could not find rte for age
    
    Added SQL-99 compliant alias matching to find_target_list_entry() that
    checks if ORDER BY identifier matches a target list alias before
    attempting expression transformation. This enables standard SQL behavior
    for sorting by aliased columns with DESC/DESCENDING/ASC/ASCENDING.
    
    Updated regression tests.
    
    Added regression tests.
    modified:   regress/expected/cypher_match.out
    modified:   regress/expected/expr.out
    modified:   regress/sql/expr.sql
    modified:   src/backend/parser/cypher_clause.c
    jrgemignani authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    b9d35d5 View commit details
    Browse the repository at this point in the history
  7. Update grammar file for maintainability (#2270)

    Consolidated duplicate code, added helper functions, and reviewed
    the grammar file for issues.
    
    NOTE: I used an AI tool to review and cleanup the grammar file. I
          have reviewed all of the work it did.
    
    Improvements:
    
    1. Added KEYWORD_STRDUP macro to eliminate hardcoded string lengths
    2. Consolidated EXPLAIN statement handling into make_explain_stmt helper
    3. Extracted WITH clause validation into validate_return_item_aliases helper
    4. Created make_default_return_node helper for subquery return-less logic
    
    Benefits:
    
    - Reduced code duplication by ~150 lines
    - Improved maintainability with helper functions
    - Eliminated manual string length calculations (error-prone)
    
    All 29 existing regression tests pass
    
    modified:   src/backend/parser/cypher_gram.y
    jrgemignani authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    7432ac6 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    d4e9b9c View commit details
    Browse the repository at this point in the history
  9. Migrate python driver configuration to pyproject.toml (#2272)

    - Add pyproject.toml with package configuration
    - Simplify setup.py to minimal backward-compatible wrapper.
    - Updated CI workflow and .gitignore.
    - Resolves warning about using setup.py directly.
    MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    d8fc867 View commit details
    Browse the repository at this point in the history
  10. Restrict age_load commands (#2274)

    This PR applies restrictions to the following age_load commands -
    
        load_labels_from_file()
        load_edges_from_file()
    
    They are now tied to a specific root directory and are required to have a
    specific file extension to eliminate any attempts to force them to access
    any other files.
    
    Nothing else has changed with the actual command formats or parameters,
    only that they work out of the /tmp/age directory and only access files
    with an extension of .csv.
    
    Added regression tests and updated the location of the csv files for
    those regression tests.
    
    modified:   regress/expected/age_load.out
    modified:   regress/sql/age_load.sql
    modified:   src/backend/utils/load/age_load.c
    jrgemignani authored and MuhammadTahaNaveed committed Dec 16, 2025
    Configuration menu
    Copy the full SHA
    3d54a1c View commit details
    Browse the repository at this point in the history
Loading