Skip to content

Import gp_url_tools extention from Greenplum#40

Open
Vlasdislav wants to merge 2 commits into
open-gpdb:REL_2_STABLEfrom
Vlasdislav:gp_url_tools
Open

Import gp_url_tools extention from Greenplum#40
Vlasdislav wants to merge 2 commits into
open-gpdb:REL_2_STABLEfrom
Vlasdislav:gp_url_tools

Conversation

@Vlasdislav

@Vlasdislav Vlasdislav commented Jun 17, 2026

Copy link
Copy Markdown
  • Add new extension gp_url_tools
  • Fix decoding of UTF-16 surrogate pairs such as emoji in decode_url()
  • Make url_tools_schema accessible to all users via GRANT USAGE ON SCHEMA
  • Tests cover UTF-16 BMP decoding and surrogate pair decoding
  • Tests cover invalid/truncated UTF-16 input error paths

Based on the implementation: https://github.com/open-gpdb/gp_url_tools

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hi, @Vlasdislav welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR imports the gp_url_tools extension (URL/URI encode/decode utilities) into Apache Cloudberry and wires it into the gpcontrib build + CI installcheck runs. It also includes a few small fixes/typo cleanups in existing code paths.

Changes:

  • Add new gp_url_tools gpcontrib extension (C implementation, extension SQL/control, README, regression tests).
  • Integrate the extension into gpcontrib build targets and GitHub Actions installcheck matrices.
  • Fix a syscache lifetime bug in GetExtStatisticsName() and rename transfromColumnEncodingAocoRootPartitiontransformColumnEncodingAocoRootPartition.

Reviewed changes

Copilot reviewed 18 out of 18 changed files in this pull request and generated 15 comments.

Show a summary per file
File Description
src/include/access/reloptions.h Rename/standardize encoding helper prototype.
src/backend/parser/parse_partition_gp.c Update comment referencing the renamed encoding helper.
src/backend/optimizer/util/plancat.c Fix returning a pointer to released syscache tuple data.
src/backend/commands/vacuum_ao.c Add CommandCounterIncrement() to make catalog updates visible to later logic.
src/backend/commands/tablecmds.c Update call site to renamed encoding helper.
src/backend/access/common/reloptions_gp.c Rename encoding helper implementation to match new name.
pom.xml Add RAT excludes for some gp_url_tools metadata/build files.
gpcontrib/Makefile Include gp_url_tools in gpcontrib recurse targets.
gpcontrib/gp_url_tools/src/gp_url_tools.c New C implementation of URL/URI encode/decode functions.
gpcontrib/gp_url_tools/sql/gp_url_tools--1.0.sql Extension install script creating schema + functions.
gpcontrib/gp_url_tools/gp_url_tools.control Extension control metadata.
gpcontrib/gp_url_tools/Makefile Extension build/regress make integration.
gpcontrib/gp_url_tools/test/sql/gp_url_tools.sql New regression test SQL.
gpcontrib/gp_url_tools/test/expected/gp_url_tools.out Expected output for regression tests.
gpcontrib/gp_url_tools/README.md New extension documentation.
gpcontrib/gp_url_tools/.clang-format Formatting configuration for the new extension.
.github/workflows/build-cloudberry.yml Add gp_url_tools installcheck to CI.
.github/workflows/build-cloudberry-rocky8.yml Add gp_url_tools installcheck to CI.
Comments suppressed due to low confidence (1)

src/backend/parser/parse_partition_gp.c:1694

  • The comment text has a few grammatical issues that make it harder to follow (e.g., “used”, “relate”, “only validate”). Consider tightening it so the intent is clear.
				/* For the aoco, used `transformColumnEncodingAocoRootPartition` to
				 * pass encoding clause in root partition. The logic in that method is
				 * relate to aoco that means it only validate and pass the aoco encoding
				 * clause options. So we have to give up pass root partition encoding
				 * clause options in other access methods which implements the call back.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/include/access/reloptions.h Outdated
Comment thread src/backend/access/common/reloptions_gp.c Outdated
Comment thread gpcontrib/gp_url_tools/gp_url_tools.control
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/test/sql/gp_url_tools.sql Outdated
Comment thread gpcontrib/gp_url_tools/test/expected/gp_url_tools.out Outdated
Comment thread gpcontrib/gp_url_tools/README.md Outdated
Comment thread gpcontrib/gp_url_tools/README.md Outdated
Comment thread gpcontrib/gp_url_tools/sql/gp_url_tools--1.0.sql
leborchuk pushed a commit that referenced this pull request Jun 19, 2026
@Vlasdislav Vlasdislav changed the base branch from main to REL_2_STABLE June 23, 2026 15:03
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/gp_url_tools.control Outdated
Comment thread gpcontrib/gp_url_tools/gp_url_tools.control
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/test/sql/gp_url_tools.sql Outdated
Comment thread gpcontrib/gp_url_tools/test/sql/gp_url_tools.sql
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
Comment thread gpcontrib/gp_url_tools/.clang-format Outdated
@andr-sokolov

Copy link
Copy Markdown

The added test should run on CI

Comment thread gpcontrib/gp_url_tools/src/gp_url_tools.c Outdated
@Vlasdislav

Copy link
Copy Markdown
Author

The added test should run on CI

I lost commit(

I'll return it

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.

4 participants