Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix PG community merge tests (pgmerge) #7778

Open
wants to merge 2 commits into
base: release-13.0
Choose a base branch
from
Open

Conversation

tejeswarm
Copy link
Contributor

@tejeswarm tejeswarm commented Dec 5, 2024

pgmerge.sql:
This is a clone of the PostgreSQL community's merge.sql test, adapted for Citus by converting tables into Citus local tables. The expectation is that any MERGE syntax that works on PostgreSQL should work on Citus as-is, utilizing our MERGE deparser.

Diffs, which primarily seem to stem from two major features in MERGE introduced by the community:

RETURNING support for MERGE
MERGE support for updatable views

Currently, Citus code does not support these features. For now, I have implemented changes to catch these cases and raise clean exceptions. With these adjustments, the pgmerge tests now pass without diffs.

@tejeswarm tejeswarm force-pushed the fix-pgmerge branch 4 times, most recently from 3cef7d3 to 1fee9e5 Compare December 5, 2024 04:46
Copy link

codecov bot commented Dec 5, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.

Project coverage is 89.61%. Comparing base (6be0649) to head (29858d7).

Additional details and impacted files
@@                   Coverage Diff                    @@
##           naisila/pg17_support    #7778      +/-   ##
========================================================
- Coverage                 89.61%   89.61%   -0.01%     
========================================================
  Files                       274      274              
  Lines                     59689    59697       +8     
  Branches                   7445     7448       +3     
========================================================
+ Hits                      53493    53499       +6     
- Misses                     4064     4069       +5     
+ Partials                   2132     2129       -3     

@tejeswarm tejeswarm force-pushed the fix-pgmerge branch 3 times, most recently from 97115bf to ce104fa Compare December 5, 2024 06:17
pgmerge.sql:
This is a clone of the PostgreSQL community's merge.sql test, adapted
for Citus by converting tables into Citus local tables. The expectation
is that any MERGE syntax that works on PostgreSQL should work on Citus
as-is, utilizing our MERGE deparser.

Diffs, which primarily seem to stem fromtwo major features in MERGE introduced by the community:

RETURNING support for MERGE
MERGE support for updatable views

Currently, Citus code does not support these features. For now, I have
implemented changes to catch these cases and raise clean exceptions.
With these adjustments, the pgmerge tests now pass without diffs.
@naisila naisila force-pushed the naisila/pg17_support branch 5 times, most recently from 1e55f40 to 1c39f95 Compare December 8, 2024 08:33
@naisila naisila force-pushed the naisila/pg17_support branch 14 times, most recently from 3d6c111 to 83e7371 Compare December 24, 2024 08:44
Base automatically changed from naisila/pg17_support to release-13.0 December 24, 2024 14:56
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.

2 participants