You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/10/13 17:33:59 UTC

[GitHub] [beam] robertwb commented on pull request #13069: [BEAM-10475] Add a well-known coder for ShardedKey in Java/Python SDK

robertwb commented on pull request #13069:
URL: https://github.com/apache/beam/pull/13069#issuecomment-707899116


   On empty key vs. marker, sorry for going back and forth--let's settle this before you change the code again. 
   
   Taking a step back, the question we want to answer is "do all ShardedKeys have a shard id" or is the shard id optional. If the former, I think representing it as a `(bytes, K)` tuple makes sense, but if we ever want to talk about "not having" a shard id than it should, logically, be `(Optional[bytes], K)` and we should use an explicit bit rather than have a "special" value of bytes that means "not there". 


----------------------------------------------------------------
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.

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