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

Values.parseString returns objects which fail ConnectSchema.validateValue

    XMLWordPrintableJSON

Details

    • Task
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • connect
    • None

    Description

      Values.parseString attempts to parse schema'd data out of blind strings. It opportunistically parses maps and arrays, and tries to find a common schema that all values can be cast to.

      If parsing succeeds but the values don't have a common schema, the Values class emits containers with null inner schemas (schemaless elements, keys, or values).

      These are not acceptable in ConnectSchema.validateValue, which currently throws an NPE, and after KAFKA-16858 will throw DataException. We should avoid producing bad data from the Values class (and the SimpleHeaderConverter which relies on it) which causes exceptions when used later, for example, as the value of a Struct.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              gharris1727 Greg Harris
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: