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

feat: support TIMESTAMP being a key column #5542

Merged
merged 5 commits into from
Jun 3, 2020

Conversation

big-andy-coates
Copy link
Contributor

Description

fixes: #5538

The TIMESTAMP property that can be specified in the WITH clause can now reference key columns.

Fixes confusing error message if the user does reference a key column as their Timestamp column:

CREATE TABLE FOO (K BIGINT PRIMARY KEY, NAME STRING)
    WITH (TIMESTAMP='K', ...);

 -- error: The TIMESTAMP column set in the WITH clause does not exist in the schema: K

When clearly K is part of the schema!

Testing done

usual

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

fixes: confluentinc#5538

The `TIMESTAMP` property that can be specified in the `WITH` clause can now reference key columns.

Fixes confusing error message if the user does reference a key column as their Timestamp column:

```sql
CREATE TABLE FOO (K BIGINT PRIMARY KEY, NAME STRING)
    WITH (TIMESTAMP='K', ...);

 -- error: The TIMESTAMP column set in the WITH clause does not exist in the schema: K
 ```

 When clearly `K` is part of the schema!
@big-andy-coates big-andy-coates added this to the 0.10.0 milestone Jun 3, 2020
@big-andy-coates big-andy-coates requested review from JimGalasyn and a team as code owners June 3, 2020 14:59
Copy link
Contributor

@agavra agavra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Minor test gaps I'd like to see filled, but otherwise good

@big-andy-coates big-andy-coates merged commit 286ce08 into confluentinc:master Jun 3, 2020
@big-andy-coates big-andy-coates deleted the ts_in_key branch June 3, 2020 20:18
stevenpyzhang pushed a commit to stevenpyzhang/ksql that referenced this pull request Jun 5, 2020
* feat: support TIMESTAMP being a key column

fixes: confluentinc#5538

The `TIMESTAMP` property that can be specified in the `WITH` clause can now reference key columns.

Fixes confusing error message if the user does reference a key column as their Timestamp column:

```sql
CREATE TABLE FOO (K BIGINT PRIMARY KEY, NAME STRING)
    WITH (TIMESTAMP='K', ...);

 -- error: The TIMESTAMP column set in the WITH clause does not exist in the schema: K
 ```

 When clearly `K` is part of the schema!

Co-authored-by: Andy Coates <[email protected]>
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

Successfully merging this pull request may close these issues.

WITH(TIMESTAMP='x') should work with KEY columns
2 participants