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 — Pg16 to master by jrgemignani · Pull Request #1454 · apache/age

Conversation

@jrgemignani

@jrgemignani jrgemignani commented Dec 21, 2023 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

When merging PG16 into the master, there were changes that needed to be addressed. This PR applies merges those changes back into PG16.

Additionally, this PR adjusts the CI scripts to be exclusively for the PG16 branch

Sorry, something went wrong.

Uh oh!

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

All reactions
jrgemignani and others added 2 commits December 12, 2023 15:22
@jrgemignani
Fix Docker file to reflect PostgreSQL version 15 (apache#1449)
0ea1186
Fixed the following Docker file to reflect running under
PostgreSQL version 15.

modified:   docker/Dockerfile.dev

This impacts the development DockerHub builds.
@jrgemignani @muhammadshoaib @rafsun42
Master to PostgreSQL version 16 (apache#1451)
81ecd56
* Initial PG16 version (apache#1237)

Fixed empty string handling.

Previously, the PG 16 outToken emitted NULL for an empty string, but now it emits an empty string "". Consequently, our cypher read function required modification to properly decode the empty string as a plain token, thereby addressing the comparison issue.

Compared the branches and added the necessary changes so that the query's rteperminfos variable doesn't stay NULL.

Fix missing include varatt.h (causing undefined symbol VARDATA_ANY) & Fixing some test cases of the failings

Added missing include varatt.h to fix the undefined symbol while loading age into postgresql because usage of VARDATA_ANY needs to import varatt.h in PG16

Modified initialisation of ResultRelInfo and removed unnecessary RTEs

Compared the branches and added the necessary changes so that the query's rteperminfos variable doesn't stay NULL.

Modified initialisation of ResultRelInfo and removed unnecessary RTEs

One of the problems that we were facing was related to the ResultRelInfo pointing at the wrong RTE via its ri_RangeTableIndex. The create_entity_result_rel_info() function does not have the capability of setting the ri_RootResultRelInfo to the correct ResultRelInfo node because it does not have access to the ModifyTableState node. The solution for this was to set the third argument in InitResultRelInfo() to be zero instead of list_length(estate->es_range_table).

In the update_entity_tuple() function, when we call table_tuple_update() and assign the returned value to the result variable, the buffer variable receives the value of 0.
Made a workaround so that the original value isn't lost.

This is a work in progress for the new field that was added to the struct Var called varnullingrels. According to the documentation, this field is responsible for marking the Vars as nullable, if they are coming from a JOIN, either LEFT JOIN, RIGHT JOIN, or FULL OUTER JOIN. The changes were made following an "optional match" clause which is being treated as a LEFT JOIN from our extension.

A function markRelsAsNulledBy is added because its internal in Postgres and doesn't belong in a header file, therefore it can't be exported. This function is added before the creation of the Vars from the make_vertex_expr and make_edge_expr, to correctly mark the specific PNSI as nullable, so later in the planner stage, the Vars will be correctly nulled.

Fix incorrect typecasting in agtype_to_graphid function.

Fix incorrect returns to the fuction _label_name, _ag_build_vertex and _ag_build_edge.
Contributors

Panagiotis Foliadis <[email protected]>
Matheus Farias <[email protected]>
Mohamed Mokhtar <[email protected]>
Hannan Aamir <[email protected]>
John Gemignani <[email protected]>
Muhammad Taha Naveed <[email protected]>
Wendel de Lana <[email protected]>
---------

* Fix Docker files to reflect PostgreSQL version 16 (apache#1448)

Fixed the following Docker files to reflect running under
PostgreSQL version 16.

    modified:   docker/Dockerfile
    modified:   docker/Dockerfile.dev

This impacts the DockerHub builds.

* Mark null-returning RTEs in outer joins as nullable

RTEs that appear in the right side of a left join are marked as 'nullable'.
The column references to a nullable RTE within the join's RTE are also
marked as 'nullable'. This concept is introduced in Postgresql v16.

The change in Postgresql v16's pullup_replace_vars_callback() function causes
different plans to be generated depending on whether appropriate RTEs are
marked nullable. Without marking nullable, in a left join, any function call
expression containing right RTE's columns as arguments are not evaluated at
the scan level, rather it is evaluated after the join is performed. At that
point, the function call may receive null input, which was unexpected in
previous Postgresql versions.

See:
----
  - Postgresql v16's commit: Make Vars be outer-join-aware
    https://www.postgresql.org/message-id/[email protected]

  - The 'Vars and PlaceHolderVars' section in the Postgresql v16's
    optimizer/README.md

* Fix minor code formatting.

---------

Co-authored-by: Shoaib <[email protected]>
Co-authored-by: Rafsun Masud <[email protected]>
@jrgemignani
jrgemignani force-pushed the PG16_to_master branch from 9f4aa08 to 69d8494 Compare December 21, 2023 18:59
@jrgemignani
jrgemignani requested review from MuhammadTahaNaveed, dehowef, muhammadshoaib and rafsun42 December 21, 2023 18:59
@jrgemignani jrgemignani mentioned this pull request Dec 21, 2023
Master to PostgreSQL version 16 #1451
Merged
rafsun42
rafsun42 approved these changes Dec 21, 2023
View reviewed changes

@rafsun42 rafsun42 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Thumbs up!

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
dehowef
dehowef approved these changes Dec 22, 2023
View reviewed changes

@dehowef dehowef left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good

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
MuhammadTahaNaveed approved these changes Dec 22, 2023
View reviewed changes

@MuhammadTahaNaveed MuhammadTahaNaveed left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

lgtm 👍🏻

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
MuhammadTahaNaveed requested changes Dec 22, 2023
View reviewed changes
Comment thread .github/workflows/go-driver.yml Resolved

Uh oh!

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

Comment thread .github/workflows/jdbc-driver.yaml Resolved

Uh oh!

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

Comment thread .github/workflows/nodejs-driver.yaml Resolved

Uh oh!

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

Comment thread .github/workflows/python-driver.yaml Resolved

Uh oh!

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

@jrgemignani
jrgemignani force-pushed the PG16_to_master branch from 69d8494 to a9b5399 Compare December 27, 2023 17:40
MuhammadTahaNaveed
MuhammadTahaNaveed approved these changes Dec 27, 2023
View reviewed changes
@jrgemignani
Merge branch 'master' into PG16_to_master
a9b5399
Resolved conflicts:
    src/backend/catalog/ag_catalog.c
    src/backend/catalog/ag_label.c
    src/backend/executor/cypher_utils.c
    src/backend/nodes/cypher_readfuncs.c
    src/backend/parser/cypher_expr.c
    src/backend/parser/cypher_item.c
    src/backend/parser/cypher_parse_agg.c
    src/backend/utils/adt/agtype.c

Modified specifically for PG16 branch:
    .github/workflows/go-driver.yml
    .github/workflows/installcheck.yaml
    .github/workflows/jdbc-driver.yaml
    .github/workflows/nodejs-driver.yaml
    .github/workflows/python-driver.yaml
    README.md
@rafsun42
rafsun42 merged commit 127b367 into apache:PG16 Dec 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@dehowef dehowef dehowef approved these changes
@MuhammadTahaNaveed MuhammadTahaNaveed MuhammadTahaNaveed approved these changes
@rafsun42 rafsun42 rafsun42 approved these changes
@muhammadshoaib muhammadshoaib Awaiting requested review from muhammadshoaib

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@jrgemignani @dehowef @MuhammadTahaNaveed @rafsun42
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.