sijie commented on a change in pull request #4022: Making use of builtin 
schemas for primitive types
URL: https://github.com/apache/pulsar/pull/4022#discussion_r274253399
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/LongSchema.java
 ##########
 @@ -70,9 +73,9 @@ public Long decode(byte[] bytes) {
         }
         validate(bytes);
         long value = 0L;
-        for (byte b : bytes) {
+        for (int i = 0; i < 8; i++) {
 
 Review comment:
   I understand the change here is for the optimization you have in presto. but 
it should be done in a clearer way, you should introduce a new decode method 
`decode(byte[] data, int offset, int len)`.

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


With regards,
Apache Git Services

Reply via email to