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

Support casting values with bytes schema to string

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.1.0
    • Component/s: KafkaConnect
    • Labels:
      None

      Description

      Casting from BYTES is not supported, which means that casting LogicalTypes is not supported.

      This proposes to allow casting anything to a string, kind of like Java's toString(), such that if the object is actually a LogicalType it can be "serialized" as string instead of bytes+schema.

       

      Examples:
      BigDecimal will cast to the string representation of the number.
      Timestamp will cast to the string representation of the timestamp, or maybe UTC yyyymmddTHH:MM:SS.f format?
      

       

      Worst case, bytes are "casted" to whatever the toString() returns - its up to the user to know the data.

      This would help when using a JSON sink, or anything that's not Avro.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                amitsela Amit Sela
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: