You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2020/03/27 05:18:32 UTC

[GitHub] [pulsar] lynnmatrix opened a new pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

lynnmatrix opened a new pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622
 
 
   <!--
   ### Contribution Checklist
     
     - Name the pull request in the form "[Issue XYZ][component] Title of the pull request", where *XYZ* should be replaced by the actual issue number.
       Skip *Issue XYZ* if there is no associated github issue for this pull request.
       Skip *component* if you are unsure about which is the best component. E.g. `[docs] Fix typo in produce method`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   Fixes #6612
   
   
   ### Motivation
   
   If message sent in json schema, long field will be decoded as int if its value below Integer.MAX_VALUE, other wise decoded as string.
   For example, the json message below: 
   ```json
   {
       "timestamp": 1585204833128
   }
   ```
   will be decoded as 
   
   ```json
   {
       "timestamp": "1585204833128"
   }
   ```
   
   ### Modifications
   
   Add field type check in GenericJsonRecord
   
   ### Verifying this change
   
   - [x] Make sure that the change passes the CI checks.
   - [x] Unit test added
   
   ### Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency):  no
     - The public API:  no
     - The schema: don't know
     - The default values of configurations: no
     - The wire protocol: no
     - The rest endpoints: no
     - The admin cli options: no
     - Anything that affects deployment: no
   
   ### Documentation
   
     - Does this pull request introduce a new feature? no
   

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608483201
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] codelipenghui commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-605539493
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608525647
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-609009909
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-606079717
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608195024
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-606042693
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#discussion_r401031555
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
 ##########
 @@ -55,12 +55,8 @@ public Object getField(String fieldName) {
             return new GenericJsonRecord(schemaVersion, fields, fn);
         } else if (fn.isBoolean()) {
             return fn.asBoolean();
-        } else if (fn.isInt()) {
-            return fn.asInt();
-        } else if (fn.isFloatingPointNumber()) {
-            return fn.asDouble();
-        } else if (fn.isDouble()) {
-            return fn.asDouble();
+        } else if (fn.isNumber()) {
 
 Review comment:
   if fn is long, then fn.aslong() should equals to fn.numberValue()。
   The differences compared to the previous code are:
   1.  If fn is BigDecimal, the new code will return BigDecimal rather than double
   2. If fn is BigInteger, the new code will return BigInteger rather than text
   3. If fn is float, the new code will return float rather than double
   
   So i modify the code like:
   ``` java
           } else if (fn.isBoolean()) {
               return fn.asBoolean();
           } else if (fn.isFloatingPointNumber()) {
               return fn.asDouble();
           } else if (fn.isBigInteger()) {
               if (fn.canConvertToLong()) {
                   return fn.asLong();
               } else {
                   return fn.asText();
               }
           } else if (fn.isNumber()) {
               return fn.numberValue();
           } else {
               return fn.asText();
           }
   ```
   I am trying to do integration tests locally but it takes too long to download snapshot jars from maven. I'll try again, and if fail again, can I push directly and do ci test?

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608970039
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] jiazhai commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-607561555
 
 
   /pulsarbot run-failure-checks
   
   

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-605590570
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-607879101
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-607659397
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608298180
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] codelipenghui commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-604911499
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] sijie commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#discussion_r400476292
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
 ##########
 @@ -55,12 +55,8 @@ public Object getField(String fieldName) {
             return new GenericJsonRecord(schemaVersion, fields, fn);
         } else if (fn.isBoolean()) {
             return fn.asBoolean();
-        } else if (fn.isInt()) {
-            return fn.asInt();
-        } else if (fn.isFloatingPointNumber()) {
-            return fn.asDouble();
-        } else if (fn.isDouble()) {
-            return fn.asDouble();
+        } else if (fn.isNumber()) {
 
 Review comment:
   I think the integration tests failed due to this change.
   
   I think we should keep the original behavior and add the following 
   
   ```
   else if (fn.isLong()) {
       return fn.asLong();
   } else if (fn.isNumber()) {
       return fn.numberValue();
   }
   ```

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-607611643
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-607712273
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-605655116
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] jiazhai commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
jiazhai commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-605390750
 
 
   /pulsarbot run-failure-checks
   
   

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-609022112
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-606717634
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#discussion_r403218042
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
 ##########
 @@ -55,12 +55,8 @@ public Object getField(String fieldName) {
             return new GenericJsonRecord(schemaVersion, fields, fn);
         } else if (fn.isBoolean()) {
             return fn.asBoolean();
-        } else if (fn.isInt()) {
-            return fn.asInt();
-        } else if (fn.isFloatingPointNumber()) {
-            return fn.asDouble();
-        } else if (fn.isDouble()) {
-            return fn.asDouble();
+        } else if (fn.isNumber()) {
 
 Review comment:
   Is there anything wrong with CI workflow? I reset to commit the one before the first commit of this PR, and it still fails.

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

[GitHub] [pulsar] sijie merged pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
sijie merged pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622
 
 
   

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

[GitHub] [pulsar] sijie commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
sijie commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#discussion_r401218690
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
 ##########
 @@ -55,12 +55,8 @@ public Object getField(String fieldName) {
             return new GenericJsonRecord(schemaVersion, fields, fn);
         } else if (fn.isBoolean()) {
             return fn.asBoolean();
-        } else if (fn.isInt()) {
-            return fn.asInt();
-        } else if (fn.isFloatingPointNumber()) {
-            return fn.asDouble();
-        } else if (fn.isDouble()) {
-            return fn.asDouble();
+        } else if (fn.isNumber()) {
 
 Review comment:
   sounds good.

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

[GitHub] [pulsar] lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#discussion_r403218860
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
 ##########
 @@ -55,12 +55,8 @@ public Object getField(String fieldName) {
             return new GenericJsonRecord(schemaVersion, fields, fn);
         } else if (fn.isBoolean()) {
             return fn.asBoolean();
-        } else if (fn.isInt()) {
-            return fn.asInt();
-        } else if (fn.isFloatingPointNumber()) {
-            return fn.asDouble();
-        } else if (fn.isDouble()) {
-            return fn.asDouble();
+        } else if (fn.isNumber()) {
 
 Review comment:
   I found this pull https://github.com/apache/pulsar/pull/6660, and it has been merged. 
   I should try again.

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608016930
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-605743436
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-605380450
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] codelipenghui commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
codelipenghui commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-604950893
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-609041930
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-608961171
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on issue #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#issuecomment-604853910
 
 
   /pulsarbot run-failure-checks

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

[GitHub] [pulsar] lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)

Posted by GitBox <gi...@apache.org>.
lynnmatrix commented on a change in pull request #6622: ISSUE-6612 FIX: parse long field in GenricJsonRecord (#6612)
URL: https://github.com/apache/pulsar/pull/6622#discussion_r403638687
 
 

 ##########
 File path: pulsar-client/src/main/java/org/apache/pulsar/client/impl/schema/generic/GenericJsonRecord.java
 ##########
 @@ -55,12 +55,8 @@ public Object getField(String fieldName) {
             return new GenericJsonRecord(schemaVersion, fields, fn);
         } else if (fn.isBoolean()) {
             return fn.asBoolean();
-        } else if (fn.isInt()) {
-            return fn.asInt();
-        } else if (fn.isFloatingPointNumber()) {
-            return fn.asDouble();
-        } else if (fn.isDouble()) {
-            return fn.asDouble();
+        } else if (fn.isNumber()) {
 
 Review comment:
   Finally pass the CI

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