Uploaded image for project: 'Kafka'
  1. Kafka
  2. KAFKA-10439

Connect's Values class loses precision for integers, larger than 64 bits

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    Description

      The `org.apache.kafka.connect.data.Values#parse` method parses integers, which are larger than `Long.MAX_VALUE` as `double` with `

      Schema.FLOAT64_SCHEMA`.

       

      That means it loses precision for these larger integers.

      For example:

      SchemaAndValue schemaAndValue = Values.parseString("9223372036854775808");
      

      returns:

      SchemaAndValue{schema=Schema{FLOAT64}, value=9.223372036854776E18}
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            odiachenko Oleksandr Diachenko
            odiachenko Oleksandr Diachenko
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment