ksql icon indicating copy to clipboard operation
ksql copied to clipboard

Incorrect KsqlStatementException in KsqlEngine.createStreamPullQuery?

Open jaceklaskowski opened this issue 3 years ago • 1 comments

It appears that this KsqlStatementException is incorrect since we're in createStreamPullQuery (not a push query), isn't it?

"Pull queries on streams are disabled. To create a push query on the stream,"
+ " add EMIT CHANGES to the end. To enable pull queries on streams, set"
+ " the " + KsqlConfig.KSQL_QUERY_STREAM_PULL_QUERY_ENABLED + " config to 'true'.",

Let me know where to ask such questions in the future if that's not the right venue.

jaceklaskowski avatar Sep 01 '22 20:09 jaceklaskowski

@jaceklaskowski this is the right place to ask these questions :) I see why that might be confusing, the error message is telling you three things:

  1. the type of query you're trying to issue is disabled
  2. you can enable it using ksql.query.stream.pull.query.enabled
  3. if you want a push query, add EMIT CHANGES

I think the fact that 3 comes before 2 is confusing. I suppose the fact that 3 shows up at all is confusing - this came from an observation that most people using ksqlDB are intending to issue a push query as that's the most common usage of ksql so we wanted to point people to that.

Open to suggestions (especially as a user of ksql not entrenched in it) what would be the clearest message in this case.

agavra avatar Sep 06 '22 17:09 agavra