confluentinc / ksql

The database purpose-built for stream processing applications.
https://ksqldb.io
Other
128 stars 1.04k forks source link

KSQL allows persistent queries containing limits to be created. #1064

Open big-andy-coates opened 6 years ago

big-andy-coates commented 6 years ago

I was playing around with the clickstream demo and a cut & paste error saw me running this statement:

CREATE STREAM CS2 AS select _time, _time + 1000 as time2 from clickstream limit 5;

This query executed without error. Then running this:

select * from CS2;

saw a constant stream of rows.

So to my mind, either KSQL should have rejected the LIMIT clause in the CSAS statement, or should have limited the output to 5 rows per partition.

agavra commented 5 years ago

Reproduced this on master as of c0bfa41a1095