citus icon indicating copy to clipboard operation
citus copied to clipboard

Pg18 ruleutils adaptation

Open m3hm3t opened this issue 6 months ago • 1 comments

https://github.com/postgres/postgres/commits/master/src/backend/utils/adt/ruleutils.c

m3hm3t avatar May 30 '25 09:05 m3hm3t

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 89.12%. Comparing base (6220ff5) to head (9525f45). Report is 3 commits behind head on m3hm3t/pg18_support.

Additional details and impacted files
@@                   Coverage Diff                   @@
##           m3hm3t/pg18_support    #8010      +/-   ##
=======================================================
- Coverage                89.14%   89.12%   -0.03%     
=======================================================
  Files                      284      284              
  Lines                    61593    61595       +2     
  Branches                  7707     7707              
=======================================================
- Hits                     54909    54895      -14     
- Misses                    4458     4472      +14     
- Partials                  2226     2228       +2     
:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

codecov[bot] avatar Jun 12 '25 11:06 codecov[bot]

		case RTE_GROUP:

			/*
			 * We couldn't get here: any Vars that reference the RTE_GROUP RTEAdd commentMore actions
			 * should have been replaced with the underlying grouping
			 * expressions.
			 */
			break;

When added that part

"case label value has already appeared in this switch at line 4856C/C++(1578)"

https://github.com/citusdata/citus/blob/8db2f4144b03e4ac093c3f46924f95b40e283e33/src/backend/distributed/deparser/ruleutils_18.c#L4856

Should I remove existing one and add one came with 18?

m3hm3t avatar Jun 19 '25 10:06 m3hm3t

[ ] 🔴 postgres/postgres@d673eef need to open a separate PR for change from name to String type, since it's not related to PG18 support.

Do you mean that a PR will merge direct to main branch?

Also I assume I need remove related commit from the this PR right?

m3hm3t avatar Jun 19 '25 10:06 m3hm3t

https://github.com/citusdata/citus/pull/8010/commits/e47f229b0f3499b8571b72a3f0a8e0f78478e9b7

m3hm3t avatar Jun 19 '25 10:06 m3hm3t

https://github.com/citusdata/citus/pull/8010/commits/0d848debf03461fecfbaa274ba16e0b6e6567b32

m3hm3t avatar Jun 19 '25 10:06 m3hm3t

Do you mean that a PR will merge direct to main branch? Also I assume I need remove related commit from the this PR right?

Yeah, exactly. Basically, it's not a change that is coming from PG18 so it would be a bit misleading to include it in PG18 support.

naisila avatar Jun 19 '25 12:06 naisila

		if (rte->rtekind == RTE_FUNCTION && rte->functions != NIL)
		{
			/* Since we're not creating Vars, rtindex etc. don't matter */
			expandRTE(rte, 1, 0, VAR_RETURNING_DEFAULT, -1,Add commentMore actions
					  true /* include dropped */ , &colnames, NULL);
		}

https://github.com/citusdata/citus/blob/0d848debf03461fecfbaa274ba16e0b6e6567b32/src/backend/distributed/deparser/ruleutils_18.c#L1239

I assume it is here. Am I wrong?

m3hm3t avatar Jun 19 '25 12:06 m3hm3t

[ ] 🔴 postgres/postgres@d673eef need to open a separate PR for change from name to String type, since it's not related to PG18 support.

reverted

https://github.com/citusdata/citus/pull/8010/commits/344a0793518fed379b10d757a7de425ff874d9e4

m3hm3t avatar Jun 19 '25 12:06 m3hm3t