Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with window aggregation #3357

Closed
gibu opened this issue Sep 16, 2019 · 1 comment
Closed

Problem with window aggregation #3357

gibu opened this issue Sep 16, 2019 · 1 comment

Comments

@gibu
Copy link

gibu commented Sep 16, 2019

Hi!
First my configuration:
I followed instructions from this tutorial https://github.com/confluentinc/cp-docker-images (branch 5.3.0-post).
After that, i have situations that I can see in ksql-cli incoming stream of data (pageviews).
So i would like to create a running query :

CREATE TABLE PAGEVIEWS_MORE_20 WITH (KAFKA_TOPIC = 'PAGEVIEWS_MORE_20') AS SELECT
  "USERID"
, COUNT(*) AS "COUNT"
FROM PAGEVIEWS PAGEVIEWS
WINDOW HOPPING ( SIZE 30 SECONDS , ADVANCE BY 10 SECONDS ) 
GROUP BY PAGEVIEWS.USERID
HAVING (COUNT(*) > 20);

When I do PRINT PAGEVIEWS_MORE_20 i can see users with more than 20 pageviews (without null values). So till that moment everything is ok.

I would like to consume data from this topic "PAGEVIEWS_MORE_20" using node library. So i wrote a script

consumer.on('message', (message) => {
  if (message.value) {
    console.log('OK');
  } else {
    console.log('NULL VALUE');
  }
});

and result is weird for me, because i am receiving that output.

NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE
OK
OK
NULL VALUE

Could you help me understand what i am doing wrong, or what cause that situation ? Could you help me to find a proper solution for that problem. I would like to not receive null values.

@big-andy-coates
Copy link
Contributor

Hi @gibu

I'm afraid this is an artefact of the current implementation of KSQL. See #3558. Up vote that issue if you're interested in seeing this fixed.

In the interest of keeping our issue backlog tidy I'm going to close this issue. Please feel free to reopen with more details if the answer does not fully answer your question of if you have a follow up question. Thanks for using KSQL!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants