somandal commented on PR #15817:
URL: https://github.com/apache/pinot/pull/15817#issuecomment-2914332159

   > * When there is single partition (`numPartitions == 1`), return 0
   > * For RT segment following LLC segment name, use the one from segment name
   > * When `partitionColumn` is not null, try to find it from partition 
metadata, and throw exception if it cannot be found
   > * When `partitionColumn` is null, use the partition metadata if it only 
contains a single partition column
   > * Otherwise, fall back to the default hash
   
   One issue today is that for CONSUMING segments and REALTIME tables where 
there is not COMPLETED instance partitions (segment relocation disabled), we 
calculate partitionId based on segment last 4 steps above, even with 
numPartitions = 1. I think that's the right thing to do for this scenario.
   
   Whereas for COMPLETED segments (ONLINE and with segment relocation enabled), 
we set to partitionId = 0 if numPartitions = 0 to be consistent with OFFLINE 
tables.
   
   Similarly, StrictRealtimeSegmentAssignment mandates partitionId to exist and 
uses a different util to get the partitionId than other REALTIME tables
   
   So it is a bit harder to consolidate everything into a single utility 
without also passing some internal context


-- 
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-unsubscr...@pinot.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@pinot.apache.org
For additional commands, e-mail: commits-h...@pinot.apache.org

Reply via email to