You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "Aitozi (via GitHub)" <gi...@apache.org> on 2024/06/18 08:40:35 UTC

[I] [Feature] Introduce mod bucket generator to paimon [paimon]

Aitozi opened a new issue, #3538:
URL: https://github.com/apache/paimon/issues/3538

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.
   
   
   ### Motivation
   
   Currently, when we define the `bucket-key` in the Paimon table, the bucket is generated using `hash(bucket-key) % bucket_number`. However, there are cases where we have already determined the target bucket at the computing edge.
   
   For instance, let's consider a Paimon table that stores user ID bitmaps. We aim to distribute users into 32 buckets evenly. Therefore, we calculate a `bucket_no` key using `hash(user_id) % 32`. Yet, under the current mechanism, it will be recalculated as `hash(bucket_no) % bucket_number`, potentially causing data skew within buckets due to hash collisions.
   
   So, what about allowing the definition of the bucket generator eg:
   
   ```
   HASH_MOD
   MOD
   ```
   
   By this, we can directly use `MOD` to distribute the data.
   
   
   ### Solution
   
   _No response_
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


-- 
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: issues-unsubscribe@paimon.apache.org.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "Aitozi (via GitHub)" <gi...@apache.org>.
Aitozi commented on issue #3538:
URL: https://github.com/apache/paimon/issues/3538#issuecomment-2175538876

   CC @JingsongLi WDYT ?


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on issue #3538:
URL: https://github.com/apache/paimon/issues/3538#issuecomment-2954439767

   Open a pr #5716  to introduce `truncate` bucket strategy, use `truncate[1]` strategy can meet the requirement of  MOD 


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "zhongyujiang (via GitHub)" <gi...@apache.org>.
zhongyujiang commented on issue #3538:
URL: https://github.com/apache/paimon/issues/3538#issuecomment-2191574300

   > The "bucket" is one way to transform partitions in Iceberg. 
   
   Yea, I think Iceberg refers to all methods of dividing datasets as partitioning. 
   
   +1 on introducing the truncate transform.
   
   I wonder if it would be better not to bind concepts like truncate and hash bucketing to Paimon bucket, as this could lead to more flexible partitioning methods, such as `truncate(col1, width), bucket(col2, numBuckets)`.
   
    


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on issue #3538:
URL: https://github.com/apache/paimon/issues/3538#issuecomment-3043993096

   > Open a pr [#5716](https://github.com/apache/paimon/pull/5716) to introduce `truncate` bucket strategy, use `truncate[1]` strategy can meet the requirement of MOD
   
   In my first version, I introudce `truncate` bucket strategy, but I do feel it's a little hard to understand for users, at least for me. So, I want to introudce `mode` bucket strategy to leave `truncate` bucket strategy as future work if paimon do need that.


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "luoyuxia (via GitHub)" <gi...@apache.org>.
luoyuxia commented on issue #3538:
URL: https://github.com/apache/paimon/issues/3538#issuecomment-2750020635

   @Aitozi Hi, is there any progress in this feature?


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi closed issue #3538: [Feature] Introduce mod bucket generator to paimon 
URL: https://github.com/apache/paimon/issues/3538


-- 
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: issues-unsubscribe@paimon.apache.org

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


Re: [I] [Feature] Introduce mod bucket generator to paimon [paimon]

Posted by "Aitozi (via GitHub)" <gi...@apache.org>.
Aitozi commented on issue #3538:
URL: https://github.com/apache/paimon/issues/3538#issuecomment-2750164542

   @luoyuxia no, I have not start on this ticket, do you want to work on this ?


-- 
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: issues-unsubscribe@paimon.apache.org

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