adutra commented on PR #15989:
URL: https://github.com/apache/iceberg/pull/15989#issuecomment-4260313835

   A few data points:
   
   In the range of 0 to 32767, there are only 3 characters that `encodeString` 
and `encodePathSegment` encode differently:
   
   | Character | Code | `encodeString` | `encodePathSegment` |
   | --------- | ---- | -------------- | ------------------- |
   | ` ` | 32 | `+` | `%20` |
   | `*` | 42 | `*` | `%2A` |
   | `~` | 126 | `%7E` | `~` |
   
   In particular the `+` sign is encoded equally:
   
   | Character | Code | `encodeString` | `encodePathSegment` |
   | --------- | ---- | -------------- | ------------------- |
   | `+` | 43 | `%2B` | `%2B` |
   
   And there is only one character that fails a crossed round trip, the space 
char (32):
   
   | Character | Code | Round Trip | Result |
   | --------- | ---- | ---------- | ------ |
   ` ` | 32 | `decodePathSegment(encodeString(' '))` | `+` |
   
   This shows evidence that:
   
   1. There is no behavioral regression when a new client (`encodePathSegment`) 
talks to an old server (`decodeString`).
   2. There is a behavioral regression when an old client (`encodeString`) 
talks to a new server (`decodePathSegment`): any space will be interpreted by 
the server as the `+` sign.
   
   That's why it's safe to upgrade clients right away, but servers should only 
upgrade when they feel it's safe to do so.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to