Import gp_url_tools extention from Greenplum#40
Conversation
There was a problem hiding this comment.
Hi, @Vlasdislav welcome!🎊 Thanks for taking the effort to make our project better! 🙌 Keep making such awesome contributions!
There was a problem hiding this comment.
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_toolsgpcontrib 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 renametransfromColumnEncodingAocoRootPartition→transformColumnEncodingAocoRootPartition.
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.
|
The added test should run on CI |
I lost commit( I'll return it |
gp_url_toolsurl_tools_schemaaccessible to all users viaGRANT USAGE ON SCHEMABased on the implementation: https://github.com/open-gpdb/gp_url_tools