[ 
https://issues.apache.org/jira/browse/TINKERPOP-3277?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18098003#comment-18098003
 ] 

ASF GitHub Bot commented on TINKERPOP-3277:
-------------------------------------------

codecov-commenter commented on PR #3540:
URL: https://github.com/apache/tinkerpop/pull/3540#issuecomment-5040757713

   ## 
[Codecov](https://app.codecov.io/gh/apache/tinkerpop/pull/3540?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)
 Report
   :white_check_mark: All modified and coverable lines are covered by tests.
   :white_check_mark: Project coverage is 77.01%. Comparing base 
([`4722890`](https://app.codecov.io/gh/apache/tinkerpop/commit/4722890ed831ba4f71c3916b5e6eafcf85439345?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache))
 to head 
([`bd8b71c`](https://app.codecov.io/gh/apache/tinkerpop/commit/bd8b71c074a407308e8e70358fe67c2570ad02e7?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 25 commits behind head on 3.7-dev.
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             3.7-dev    #3540      +/-   ##
   =============================================
   + Coverage      75.49%   77.01%   +1.51%     
   =============================================
     Files           1092       28    -1064     
     Lines          67208     5330   -61878     
     Branches        7391        0    -7391     
   =============================================
   - Hits           50742     4105   -46637     
   + Misses         13837     1021   -12816     
   + Partials        2629      204    -2425     
   ```
   </details>
   
   [:umbrella: View full report in Codecov by 
Harness](https://app.codecov.io/gh/apache/tinkerpop/pull/3540?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   
   :loudspeaker: Have feedback on the report? [Share it 
here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :snowflake: [Test 
Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, 
report on failures, and find test suite problems.
   - :package: [JS Bundle 
Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save 
yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>




> gremlin-go can't serialize zero in bigdecimal/biginteger
> --------------------------------------------------------
>
>                 Key: TINKERPOP-3277
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-3277
>             Project: TinkerPop
>          Issue Type: Bug
>          Components: go
>    Affects Versions: 3.7.6, 3.8.1
>            Reporter: Ken Hu
>            Priority: Minor
>
> Caveat: I haven't fully verified this, just something AI told me when I was 
> writing the "model" tests for gremlin-go. Just putting here so it can be 
> checked later.
> Gremlin-Go serializes zero BigInteger as a GraphBinary length of 0 with no 
> bytes. Java expects a valid two’s-complement BigInteger byte array, where 
> zero is encoded as length 1 with byte 0x00. When Java reads Go’s zero-length 
> form, new BigInteger(new byte[0]) throws NumberFormatException, so Java 
> servers cannot read zero BigInteger values sent by Go.
> The same affects BigDecimal when its unscaled value is zero, because that 
> unscaled value is serialized as a BigInteger.
> {code:java}
> func TestZeroBigIntegerGraphBinaryV1Bytes(t *testing.T) {
>       var buffer bytes.Buffer
>       got, err := bigIntWriter(*big.NewInt(0), &buffer, nil)
>       if err != nil {
>               t.Fatal(err)
>       }
>       want := []byte{0x00, 0x00, 0x00, 0x01, 0x00}
>       if !bytes.Equal(got, want) {
>               t.Fatalf("zero BigInteger bytes = % x, want % x", got, want)
>       }
>   }
>   Current output:
>   00 00 00 00
>   Expected output:
>   00 00 00 01 00
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to