fix(test): Adapt operator metadata test for Cloudberry support#31
Merged
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom Aug 28, 2025
Merged
Conversation
This commit modifies the operator metadata integration test to support Cloudberry in addition to the original Greenplum support. The original test created a unary prefix operator, which worked fine for Greenplum. However, Cloudberry (based on PostgreSQL 14) no longer supports user-defined unary operators, causing the test to fail. To ensure compatibility across both platforms, the test now uses a binary operator approach universally, which is supported by both Greenplum and Cloudberry. This eliminates the need for conditional logic while maintaining the same test coverage. Changes: - Replace unary prefix operator with binary operator - Use `binary_op_func(bigint, bigint)` instead of `numeric_fac` - Update operator syntax to `(LEFTARG = bigint, RIGHTARG = bigint)` - Remove database-specific conditional branching This change ensures the test passes on both Greenplum and Cloudberry without compromising the metadata validation logic.
my-ship-it
approved these changes
Aug 28, 2025
gfphoenix78
approved these changes
Aug 28, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This commit modifies the operator metadata integration test to support Cloudberry in addition to the original Greenplum support.
The original test created a unary prefix operator, which worked fine for Greenplum. However, Cloudberry (based on PostgreSQL 14) no longer supports user-defined unary operators, causing the test to fail.
To ensure compatibility across both platforms, the test now uses a binary operator approach universally, which is supported by both Greenplum and Cloudberry. This eliminates the need for conditional logic while maintaining the same test coverage.
Changes:
binary_op_func(bigint, bigint)instead ofnumeric_fac(LEFTARG = bigint, RIGHTARG = bigint)This change ensures the test passes on both Greenplum and Cloudberry without compromising the metadata validation logic.