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

Breaking Change: Change syntax to require EMIT STREAM for persistent queries #3303

Open
big-andy-coates opened this issue Sep 6, 2019 · 3 comments

Comments

@big-andy-coates
Copy link
Contributor

As part of the work to introduce syntax to support static queries, (#3300, #3242), we required continuous bare queries to include the EMIT keyword, e.g. SELECT * FROM X EMIT CHANGES. However, to maintain backwards compatibility of existing persistent queries we said that EMIT CHANGES on persistent queries was implicit and therefore optional.

In the next major release we should switch the syntax to require EMIT CHANGES or EMIT FINAL for continuous C*AS and INSERT INTO statements.

The major benefits are:

  • Consistency with bare queries.
  • Open's up the language to allow CREATE TABLE X AS SELECT * FROM Y to being a statement that creates table X that is a snapshot of table Y at the current moment, rather than a continuously updating copy.
@agavra
Copy link
Contributor

agavra commented Nov 20, 2019

We've had discussions about this all over the place, but my current opinion is that we should not require EMIT CHANGES on streams because all streaming queries emit changes. In fact, I think we should not allow that at all (especially when we add concepts like EMIT FINAL on tables).

@mjsax
Copy link
Member

mjsax commented Nov 21, 2019

Can this be discussed in the context of KLIP-11 ?

@big-andy-coates
Copy link
Contributor Author

This needs design discussions to ensure this is the direction we need to go...

@big-andy-coates big-andy-coates removed their assignment Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants