[ 
https://issues.apache.org/jira/browse/KAFKA-8911?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16931670#comment-16931670
 ] 

Matthias J. Sax commented on KAFKA-8911:
----------------------------------------

Thanks for the PR [~atais] – you can re-trigger a build by adding a comment on 
the PR that contains the phrase "retest this please". I would hold off for now 
to rerun the tests until you got a review though – if you need to update the PR 
each `push` will trigger retesting anyway – Jenkins is often overloaded anyway 
and we try to save cycles if we can.

 Btw: please ask question directly on the PR instead of the Jira ticket – 
that's easier for us. Thanks a lot.

> Implicit TimeWindowedSerde creates Serde with null inner serializer
> -------------------------------------------------------------------
>
>                 Key: KAFKA-8911
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8911
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.3.0
>            Reporter: Michał
>            Assignee: Michał
>            Priority: Major
>
> {{Serdes.scala}} contains an implicit def timeWindowedSerde as below:
>  
> {code:java}
> implicit def timeWindowedSerde[T]: WindowedSerdes.TimeWindowedSerde[T] = new 
> WindowedSerdes.TimeWindowedSerde[T]()
> {code}
> It creates a new {{TimeWindowedSerde}} without inner serializer, which is a 
> bug. Even in {{WindowedSerdes.java}} it says that empty constructor is for 
> reflection.
> {code:java}
> // Default constructor needed for reflection object creation
> public TimeWindowedSerde() {
>     super(new TimeWindowedSerializer<>(), new TimeWindowedDeserializer<>());
> }
> public TimeWindowedSerde(final Serde<T> inner) {
>      super(new TimeWindowedSerializer<>(inner.serializer()), new 
> TimeWindowedDeserializer<>(inner.deserializer()));
> }
> {code}
> All above failes for me when I try to implicitly access the right Serde:
> {code:java}
> private val twSerde = implicitly[TimeWindowedSerde[String]]
> {code}
> and I have to create the object properly on my own
> {code}
>   private val twSerde = new 
> WindowedSerdes.TimeWindowedSerde[String](implicitly[Serde[String]])
> {code}
> it could be fixed with a proper call in {{Serdes.scala}}
> {code}
>   implicit def timeWindowedSerde[T](implicit tSerde: Serde[T]): 
> WindowedSerdes.TimeWindowedSerde[T] =
>     new WindowedSerdes.TimeWindowedSerde[T](tSerde)
> {code}
> But maybe also the scope of the default constructor for {{TimeWindowedSerde}} 
> should be changed?
> BR, Michał



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to