-
Notifications
You must be signed in to change notification settings - Fork 1k
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
feat: add basic support for key syntax #3034
feat: add basic support for key syntax #3034
Conversation
Adds ability to explicitly include key fields in C* statements so long as: - the key field is named `ROWKEY` - it of type `STRING`. i.e. you can now do: `CREATE STREAM FOO AS (ROWKEY STRING KEY, ...) ...;`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @big-andy-coates, left a few comments.
Are you planning to support CT statement for topics with WINDOWED keys?
ksql-engine/src/main/java/io/confluent/ksql/planner/plan/JoinNode.java
Outdated
Show resolved
Hide resolved
ksql-parser/src/main/antlr4/io/confluent/ksql/parser/SqlBase.g4
Outdated
Show resolved
Hide resolved
ksql-parser/src/test/java/io/confluent/ksql/parser/SqlFormatterTest.java
Outdated
Show resolved
Hide resolved
ksql-parser/src/test/java/io/confluent/ksql/parser/SqlFormatterTest.java
Outdated
Show resolved
Hide resolved
We currently do through the use of the @mjsax knows more about the details. They're planning to fix this with KIP-300: https://cwiki.apache.org/confluence/display/KAFKA/KIP-300%3A+Add+Windowed+KTable+API+in+StreamsBuilder If you're wondering how the syntax will work in KSQL for windowed keys, then for this initial piece I wasn't planning on changing how they currently work. So the user will be able to use |
Conflicting files ksql-engine/src/test/java/io/confluent/ksql/ddl/commands/CommandFactoriesTest.java ksql-engine/src/test/java/io/confluent/ksql/ddl/commands/CreateSourceCommandTest.java ksql-engine/src/test/java/io/confluent/ksql/ddl/commands/CreateStreamCommandTest.java ksql-engine/src/test/java/io/confluent/ksql/ddl/commands/CreateTableCommandTest.java ksql-engine/src/test/java/io/confluent/ksql/schema/ksql/inference/DefaultSchemaInjectorTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/KsqlParserTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/SchemaParserTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/SqlFormatterTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/rewrite/StatementRewriterTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/tree/CreateStreamTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/tree/CreateTableTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/tree/TableElementTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/tree/TableElementsTest.java ksql-rest-app/src/test/java/io/confluent/ksql/rest/server/StandaloneExecutorTest.java ksql-rest-app/src/test/java/io/confluent/ksql/rest/server/resources/KsqlResourceTest.java
Conflicting files ksql-engine/src/test/java/io/confluent/ksql/ddl/commands/CommandFactoriesTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/tree/CreateStreamTest.java ksql-parser/src/test/java/io/confluent/ksql/parser/tree/CreateTableTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM pending green build!
Merging with one reviewer, as it's been two weeks since this PR was raised. |
Description
Adds ability to explicitly include key fields in C* statements so long as:
ROWKEY
STRING
.i.e. you can now do:
CREATE STREAM FOO AS (ROWKEY STRING KEY, V0 INT) ...;
Which is semantically the same:
CREATE STREAM FOO AS (V0 INT) ...;
Testing done
mvn test
Reviewer checklist