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/04/08 19:59:59 UTC

[GitHub] [beam] lukecwik commented on a change in pull request #11336: [BEAM-9718] Updates comments for WINDOWED_VALUE coder

lukecwik commented on a change in pull request #11336: [BEAM-9718] Updates comments for WINDOWED_VALUE coder
URL: https://github.com/apache/beam/pull/11336#discussion_r405775843
 
 

 ##########
 File path: model/pipeline/src/main/proto/beam_runner_api.proto
 ##########
 @@ -739,9 +739,44 @@ message StandardCoders {
     // Components: None
     GLOBAL_WINDOW = 7 [(beam_urn) = "beam:coder:global_window:v1"];
 
-    // Encodes an element, the window the value is in, the timestamp of the element, and the pane
-    // of the element
-    // Components: The element coder and the window coder, in that order
+    // Encodes an element, the windows it is in, the timestamp of the element,
+    // and the pane of the element. The encoding is represented as:
+    // timestamp windows pane element
+    //   timestamp - A big endian 8 byte integer representing millis-since-epoch.
+    //     The encoded representation is shifted so that the byte representation
+    //     of negative values are lexicographically ordered before the byte
+    //     representation of positive values.
+    //
 
 Review comment:
   ```suggestion
       //     representation of positive values. This is typically done by subtracting -9223372036854775808
       //     from the value and encoding it as a signed big endian integer. Example values:
       //
       //     -9223372036854775808: 00 00 00 00 00 00 00 00
       //                     -255: 7F FF FF FF FF FF FF 01
       //                       -1: 7F FF FF FF FF FF FF FF
       //                        0: 80 00 00 00 00 00 00 00
       //                        1: 80 00 00 00 00 00 00 01
       //                      256: 80 00 00 00 00 00 01 00
       //      9223372036854775807: FF FF FF FF FF FF FF FF
       //
   ```

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


With regards,
Apache Git Services