You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avro.apache.org by GitBox <gi...@apache.org> on 2021/01/20 21:41:20 UTC

[GitHub] [avro] jviotti opened a new pull request #1065: AVRO-3028: Records encode fields that equal the default

jviotti opened a new pull request #1065:
URL: https://github.com/apache/avro/pull/1065


   I believe that this is an important aspect to clarify as some other
   serialization formats omit fields that equal their default for
   space-efficiency reasons. I had to run a small experiment as I could not
   find this information in the spec.
   
   Signed-off-by: Juan Cruz Viotti <jv...@jviotti.com>
   
   Make sure you have checked _all_ steps below.
   
   ### Jira
   
   - [x] My PR addresses the following [Avro Jira](https://issues.apache.org/jira/browse/AVRO/) issues and references them in the PR title. For example, "AVRO-1234: My Avro PR"
     - https://issues.apache.org/jira/browse/AVRO-3028
     - In case you are adding a dependency, check if the license complies with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x).
   
   ### Tests
   
   - [x] My PR adds the following unit tests __OR__ does not need testing for this extremely good reason:
   
   ### Commits
   
   - [x] My commits all reference Jira issues in their subject lines. In addition, my commits follow the guidelines from "[How to write a good git commit message](https://chris.beams.io/posts/git-commit/)":
     1. Subject is separated from body by a blank line
     1. Subject is limited to 50 characters (not including Jira issue reference)
     1. Subject does not end with a period
     1. Subject uses the imperative mood ("add", not "adding")
     1. Body wraps at 72 characters
     1. Body explains "what" and "why", not "how"
   
   ### Documentation
   
   - [x] In case of new functionality, my PR adds documentation that describes how to use it.
     - All the public functions and the classes in the PR contain Javadoc that explain what it does
   


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



[GitHub] [avro] RyanSkraba merged pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
RyanSkraba merged pull request #1065:
URL: https://github.com/apache/avro/pull/1065


   


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



[GitHub] [avro] RyanSkraba commented on pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on pull request #1065:
URL: https://github.com/apache/avro/pull/1065#issuecomment-768322949


   Hello!  Nobody has objected after a few days, and I think your wording is precise.  I merged and cherry-picked to [branch-1.10](https://github.com/apache/avro/commit/523a1270a38930fb5c82c04744cb844844908717)  Thanks for this contribution!


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



[GitHub] [avro] jviotti commented on a change in pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
jviotti commented on a change in pull request #1065:
URL: https://github.com/apache/avro/pull/1065#discussion_r561909119



##########
File path: doc/src/content/xdocs/spec.xml
##########
@@ -564,7 +565,7 @@
                 followed by the serialized string:
                 <source>02 02 61</source></li>
             </ul>
-            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long. 
+            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long.

Review comment:
       Sounds good. I'll add this change to the commit!




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



[GitHub] [avro] RyanSkraba commented on a change in pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on a change in pull request #1065:
URL: https://github.com/apache/avro/pull/1065#discussion_r561887441



##########
File path: doc/src/content/xdocs/spec.xml
##########
@@ -564,7 +565,7 @@
                 followed by the serialized string:
                 <source>02 02 61</source></li>
             </ul>
-            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long. 
+            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long.

Review comment:
       ```suggestion
               <p><em>NOTE</em>: Currently for C/C++ implementations, the positions are practically an int, but theoretically a long.
   ```
   While you're at this sentence :D




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



[GitHub] [avro] jviotti commented on pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
jviotti commented on pull request #1065:
URL: https://github.com/apache/avro/pull/1065#issuecomment-764671388


   @RyanSkraba Agreed! I updated the PR with a (hopefully) better explanation. What do you think? I'm happy to keep iterating on it until we are 100% satisfied!


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



[GitHub] [avro] jviotti commented on a change in pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
jviotti commented on a change in pull request #1065:
URL: https://github.com/apache/avro/pull/1065#discussion_r561909119



##########
File path: doc/src/content/xdocs/spec.xml
##########
@@ -564,7 +565,7 @@
                 followed by the serialized string:
                 <source>02 02 61</source></li>
             </ul>
-            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long. 
+            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long.

Review comment:
       Sounds good. I'll add this change to the commit!




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



[GitHub] [avro] jviotti commented on pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
jviotti commented on pull request #1065:
URL: https://github.com/apache/avro/pull/1065#issuecomment-768332662


   Awesome, thanks!


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



[GitHub] [avro] RyanSkraba commented on a change in pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
RyanSkraba commented on a change in pull request #1065:
URL: https://github.com/apache/avro/pull/1065#discussion_r561887441



##########
File path: doc/src/content/xdocs/spec.xml
##########
@@ -564,7 +565,7 @@
                 followed by the serialized string:
                 <source>02 02 61</source></li>
             </ul>
-            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long. 
+            <p><em>NOTE</em>: Currently for C/C++ implementtions, the positions are practically an int, but theoretically a long.

Review comment:
       ```suggestion
               <p><em>NOTE</em>: Currently for C/C++ implementations, the positions are practically an int, but theoretically a long.
   ```
   While you're at this sentence :D




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



[GitHub] [avro] jviotti commented on pull request #1065: AVRO-3028: Records encode fields that equal the default

Posted by GitBox <gi...@apache.org>.
jviotti commented on pull request #1065:
URL: https://github.com/apache/avro/pull/1065#issuecomment-764671388


   @RyanSkraba Agreed! I updated the PR with a (hopefully) better explanation. What do you think? I'm happy to keep iterating on it until we are 100% satisfied!


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