[ 
https://issues.apache.org/jira/browse/KAFKA-12695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Yura Nosenko updated KAFKA-12695:
---------------------------------
    Description: 
KStream.toTable seems to not be as useful as it can.`KStream.toTable` seems to 
not be as useful as it can.I have a simple piece of code:

{{ builder.stream[String, String](post)}}{{.map(postExtractor)}}{{.toTable }}

 

{{That fails with:}}
 {{    Caused by: java.lang.ClassCastException: class java.lang.Long cannot be 
cast to class [B (java.lang.Long and [B are in module java.base of loader 
'bootstrap')}}

But if I tweak it to:
    

{{builder.stream[String, String](post).map(postExtractor).to("output-topic")}}

 

It seems that toTable can only work with the default Serde configs. But if it's 
the case it's of a limited use.

Especially in Scala code where all Produced/Consumed can be inferred as 
implicit otherwise.

  was:
KStream.toTable seems to not be as useful as it can.`KStream.toTable` seems to 
not be as useful as it can.I have a simple piece of code:

{{ builder.stream[String, String](post)}}{{.map(postExtractor)}}{{.toTable }}

{{That fails with:}}
 {{    Caused by: java.lang.ClassCastException: class java.lang.Long cannot be 
cast to class [B (java.lang.Long and [B are in module java.base of loader 
'bootstrap')}}

But if I tweak it to:
     builder.stream[String, String](post).map(postExtractor).to("output-topic")

It seems that toTable can only work with the default Serde configs. But if it's 
the case it's of a limited use.

Especially in Scala code where all Produced/Consumed can be inferred as 
implicit otherwise.


> KStream.toTable must be extended to allow for a specific Serde  
> ----------------------------------------------------------------
>
>                 Key: KAFKA-12695
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12695
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.7.0
>            Reporter: Yura Nosenko
>            Priority: Minor
>
> KStream.toTable seems to not be as useful as it can.`KStream.toTable` seems 
> to not be as useful as it can.I have a simple piece of code:
> {{ builder.stream[String, String](post)}}{{.map(postExtractor)}}{{.toTable }}
>  
> {{That fails with:}}
>  {{    Caused by: java.lang.ClassCastException: class java.lang.Long cannot 
> be cast to class [B (java.lang.Long and [B are in module java.base of loader 
> 'bootstrap')}}
> But if I tweak it to:
>     
> {{builder.stream[String, String](post).map(postExtractor).to("output-topic")}}
>  
> It seems that toTable can only work with the default Serde configs. But if 
> it's the case it's of a limited use.
> Especially in Scala code where all Produced/Consumed can be inferred as 
> implicit otherwise.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to