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

Relax Kafka Streams API type constraints

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 0.10.2.0
    • streams

    Description

      Streams API methods that apply transformations to streams are currently invariant in the key and value types, when they should probably be contravariant in those types.

      For instance, KStream.filter(Predicate<K, V> predicate) should be KStream.filter(Predicate<? super K, ? super V> predicate) to accept predicates that can act on any supertype of K, or V.

      Same thing applies to method that take Aggregator, StreamPartitioner, KeyValueMapper, ValueMapper, ProcessorSupplier, ValueJoiner, etc.

      Attachments

        Issue Links

          Activity

            People

              xvrl Xavier Léauté
              xvrl Xavier Léauté
              Guozhang Wang Guozhang Wang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: