You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by "tuhaihe (via GitHub)" <gi...@apache.org> on 2026/02/28 04:31:53 UTC

[PR] New contrib/fixeddecimal: add support for Cloudberry [cloudberry]

tuhaihe opened a new pull request, #1584:
URL: https://github.com/apache/cloudberry/pull/1584

   <!-- Thank you for your contribution to Apache Cloudberry (Incubating)! -->
   
   Fixes #ISSUE_Number
   
   ### What does this PR do?
   <!-- Brief overview of the changes, including any major features or fixes -->
   
   ### Type of Change
   - [ ] Bug fix (non-breaking change)
   - [ ] New feature (non-breaking change)
   - [ ] Breaking change (fix or feature with breaking changes)
   - [ ] Documentation update
   
   ### Breaking Changes
   <!-- Remove if not applicable. If yes, explain impact and migration path -->
   
   ### Test Plan
   <!-- How did you test these changes? -->
   - [ ] Unit tests added/updated
   - [ ] Integration tests added/updated
   - [ ] Passed `make installcheck`
   - [ ] Passed `make -C src/test installcheck-cbdb-parallel`
   
   ### Impact
   <!-- Remove sections that don't apply -->
   **Performance:**
   <!-- Any performance implications? -->
   
   **User-facing changes:**
   <!-- Any changes visible to users? -->
   
   **Dependencies:**
   <!-- New dependencies or version changes? -->
   
   ### Checklist
   - [ ] Followed [contribution guide](https://cloudberry.apache.org/contribute/code)
   - [ ] Added/updated documentation
   - [ ] Reviewed code for security implications
   - [ ] Requested review from [cloudberry committers](https://github.com/orgs/apache/teams/cloudberry-committers)
   
   ### Additional Context
   <!-- Any other information that would help reviewers? Remove if none -->
   
   ### CI Skip Instructions
   <!--
   To skip CI builds, add the appropriate CI skip identifier to your PR title.
   The identifier must:
   - Be in square brackets []
   - Include the word "ci" and either "skip" or "no"
   - Only use for documentation-only changes or when absolutely necessary
   -->
   
   ---
   <!-- Join our community:
   - Mailing list: [dev@cloudberry.apache.org](https://lists.apache.org/list.html?dev@cloudberry.apache.org) (subscribe: dev-subscribe@cloudberry.apache.org)
   - Discussions: https://github.com/apache/cloudberry/discussions -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [PR] New contrib/fixeddecimal: add support for Cloudberry [cloudberry]

Posted by "avamingli (via GitHub)" <gi...@apache.org>.
avamingli commented on code in PR #1584:
URL: https://github.com/apache/cloudberry/pull/1584#discussion_r2871336516


##########
contrib/fixeddecimal/test/expected/index.out:
##########
@@ -10,16 +11,23 @@ INSERT INTO fixdec (id,d) VALUES(8, 123.45);
 INSERT INTO fixdec (id,d) VALUES(9, 123.456);
 -- Should fail
 CREATE UNIQUE INDEX fixdec_d_idx ON fixdec (d);
-ERROR:  could not create unique index "fixdec_d_idx"
-DETAIL:  Key (d)=(123.45) is duplicated.
+ERROR:  UNIQUE index must contain all columns in the table's distribution key
+DETAIL:  Distribution key column "id" is not included in the constraint.
 DELETE FROM fixdec WHERE id = 9;
 CREATE UNIQUE INDEX fixdec_d_idx ON fixdec (d);
+ERROR:  UNIQUE index must contain all columns in the table's distribution key
+DETAIL:  Distribution key column "id" is not included in the constraint.
 SET enable_seqscan = off;
 EXPLAIN (COSTS OFF) SELECT * FROM fixdec ORDER BY d;
-               QUERY PLAN                
------------------------------------------
- Index Scan using fixdec_d_idx on fixdec
-(1 row)
+              QUERY PLAN               
+---------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)
+   Merge Key: d
+   ->  Sort
+         Sort Key: d
+         ->  Seq Scan on fixdec

Review Comment:
   The origin test is intend to test duplicated keys:
   > ERROR:  could not create unique index "fixdec_d_idx"
   DETAIL:  Key (d)=(123.45) is duplicated.
   ERROR:  UNIQUE index must contain all columns in the table's distribution key
   DETAIL:  Distribution key column "id" is not included in the constraint.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [PR] New contrib/fixeddecimal: add support for Cloudberry [cloudberry]

Posted by "avamingli (via GitHub)" <gi...@apache.org>.
avamingli commented on code in PR #1584:
URL: https://github.com/apache/cloudberry/pull/1584#discussion_r2871324321


##########
contrib/fixeddecimal/test/expected/index.out:
##########
@@ -35,11 +43,13 @@ SELECT * FROM fixdec ORDER BY d;
 (8 rows)
 
 EXPLAIN (COSTS OFF) SELECT * FROM fixdec WHERE d = '12.34'::FIXEDDECIMAL;
-                QUERY PLAN                 
--------------------------------------------
- Index Scan using fixdec_d_idx on fixdec
-   Index Cond: (d = '12.34'::fixeddecimal)
-(2 rows)
+                QUERY PLAN
+------------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)
+   ->  Seq Scan on fixdec
+         Filter: (d = '12.34'::fixeddecimal)
+ Optimizer: GPORCA
+(4 rows)

Review Comment:
   Any explain about that? 



##########
contrib/fixeddecimal/test/expected/index.out:
##########
@@ -10,16 +11,23 @@ INSERT INTO fixdec (id,d) VALUES(8, 123.45);
 INSERT INTO fixdec (id,d) VALUES(9, 123.456);
 -- Should fail
 CREATE UNIQUE INDEX fixdec_d_idx ON fixdec (d);
-ERROR:  could not create unique index "fixdec_d_idx"
-DETAIL:  Key (d)=(123.45) is duplicated.
+ERROR:  UNIQUE index must contain all columns in the table's distribution key
+DETAIL:  Distribution key column "id" is not included in the constraint.
 DELETE FROM fixdec WHERE id = 9;
 CREATE UNIQUE INDEX fixdec_d_idx ON fixdec (d);
+ERROR:  UNIQUE index must contain all columns in the table's distribution key
+DETAIL:  Distribution key column "id" is not included in the constraint.
 SET enable_seqscan = off;
 EXPLAIN (COSTS OFF) SELECT * FROM fixdec ORDER BY d;
-               QUERY PLAN                
------------------------------------------
- Index Scan using fixdec_d_idx on fixdec
-(1 row)
+              QUERY PLAN               
+---------------------------------------
+ Gather Motion 3:1  (slice1; segments: 3)
+   Merge Key: d
+   ->  Sort
+         Sort Key: d
+         ->  Seq Scan on fixdec

Review Comment:
   Please fix that, not just copy the error into tests.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org


Re: [PR] New contrib/fixeddecimal: add support for Cloudberry [cloudberry]

Posted by "tuhaihe (via GitHub)" <gi...@apache.org>.
tuhaihe commented on PR #1584:
URL: https://github.com/apache/cloudberry/pull/1584#issuecomment-3983158204

   > And why we must add this contrib into repo?
   
   There was one discussion on integrating More Extensions into Apache Cloudberryhttps://lists.apache.org/thread/o5n45tw6ok7wqpd7wdyhdgyhzlcs5t7j. fixeddecimal is one part of the work.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org