Ksqldb Session window generate magic null row

0

Today i test Windows in SQL queries and got strange behavior with Session window . I create new stream, new session table, and insert 1 row but in topic see 2 rows per 1 insert (1 with value null \ , see screenshot). What is problem ? Other options Hopping window and Tumbling window dont generate “magic null” row.

create stream:

CREATE STREAM MOVIE_TICKET_SALES2 (title VARCHAR, c INT)
    WITH (KAFKA_TOPIC='movie-ticket-sales2',
          PARTITIONS=1,
         VALUE_FORMAT='json');

create table with session:

  create table table_ses60sec2 as select title, count(*) from  MOVIE_TICKET_SALES2 window session (60 second) group by title;

insert:

 insert into MOVIE_TICKET_SALES2 values ('s', 1);
 insert into MOVIE_TICKET_SALES2 values ('s', 1);
 insert into MOVIE_TICKET_SALES2 values ('s', 1);

and select by print and select :

print  TABLE_SES60SEC2;

enter image description here

 select * from TABLE_ses60SEC2 emit changes;

enter image description here

Maybe you are hitting: [KAFKA-8318] Session Window Aggregations generate an extra tombstone - ASF JIRA

2 Likes

omg
Status: IN PROGRESS
omg
Created: 03/May/19 14:39

:crazy_face:

I don’t think that there is any progress – the ticket status was just never updated. Feel free to pick up the ticket if you are interested and provide a fix for it.

This topic was automatically closed after 30 days. New replies are no longer allowed.