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

John Roesler commented on KAFKA-9636:
-------------------------------------

Hey [~psnively] ,

I can't claim to fully understand the data generation logic in that test, but 
I'm pretty sure the generated data isn't correct.

I added a couple of printlns to the data generation block, and this is what I 
see:
{noformat}
topics: List(input-topic-1, input-topic-2)
tables: 
List((com.compstak.org.apache.kafka.streams.scala.kstream.KTable@6ee6f53,0), 
(com.compstak.org.apache.kafka.streams.scala.kstream.KTable@421bba99,1))

t1: com.compstak.org.apache.kafka.streams.scala.kstream.KTable@6ee6f53
i1: 0
t2: com.compstak.org.apache.kafka.streams.scala.kstream.KTable@421bba99

foreign-key-property: n

topic[TestInputTopic[topic='input-topic-1', keySerializer=StringSerializer, 
valueSerializer=anon$1]] key[r] value[object[ -> {
  "" : true
},n -> "r"]] 

topic[TestInputTopic[topic='input-topic-2', keySerializer=StringSerializer, 
valueSerializer=anon$1]] key[b] value[object[u -> "b"]]{noformat}
Here, we can see that the generated foreign-key property is "n", and it looks 
like the both records have references to their own keys. I think what you 
wanted was for record "r" in "input-topic-1" to reference record "b" in 
"input-topic-2". Instead, it references record "r" in "input-topic-2", which 
does not exist.

Hope this helps,

-John

> Simple join of two KTables fails
> --------------------------------
>
>                 Key: KAFKA-9636
>                 URL: https://issues.apache.org/jira/browse/KAFKA-9636
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 2.4.1
>            Reporter: Paul Snively
>            Priority: Major
>         Attachments: kafka.tar.xz, merge_issue.zip, merge_issue.zip
>
>
> Attempting to join two KTables yields a `Topology` that, when tested with 
> `TopologyTestDriver` by adding records to the two `TestInputTopic`s, results 
> in an empty `TestOutputTopic`.
> I'm attaching a very small reproduction. The code is in Scala. The project is 
> therefore an "sbt" project. You can reproduce the results from your shell 
> with `sbt test`. The failure output will include the `describe` of the 
> `Topology` in question.



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

Reply via email to