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

            People

            • Assignee:
              odiachenko Oleksandr Diachenko
              Reporter:
              odiachenko Oleksandr Diachenko

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment