Skip to content

fix(test): Adapt operator metadata test for Cloudberry support#31

Merged
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom
robertmu:operator-metadata
Aug 28, 2025
Merged

fix(test): Adapt operator metadata test for Cloudberry support#31
gfphoenix78 merged 1 commit intoapache:sync-with-upstreamfrom
robertmu:operator-metadata

Conversation

@robertmu
Copy link
Copy Markdown
Contributor

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.

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.
@gfphoenix78 gfphoenix78 merged commit 2d0880a into apache:sync-with-upstream Aug 28, 2025
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.

3 participants