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(static): unordered table elements and meta columns serialization #3428

Merged

Conversation

big-andy-coates
Copy link
Contributor

@big-andy-coates big-andy-coates commented Sep 27, 2019

Description

Following on from #3422, which saw LogicalSchema enhanced to support arbitrary key & value column orders...

A query might contain key and value columns in any order. Hence the TableElements class has been changed to:

  • not fail if key columns come after value columns
  • not change the order of columns

When serializing a logical schema across the wire, (which is currently only used for static queries), we should't yet serialize the ROWTIME meta column. This is mainly because static queries don't support it, and our syntax doesn't support meta columns, i.e. you can't have a CREATE TABLE X (ROWTIME BIGINT META, .... So if we did include it in the serialized form, we wouldn't be able to parse it.

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 #")

A query might contain key and value columns in any order. Hence the `TableElements` class has been changed to:

 - not fail if key columns come after value columns
 - not change the order of columns

When serializing a logical schema across the wire, (which is currently only used for static queries), we should't yet serialize the ROWTIME meta column. This is mainly because static queries don't support it, and our syntax doesn't support meta columns, i.e. you can't have a `CREATE TABLE X (ROWTIME BIGINT META, ...`. So if we did include it in the serialized form, we wouldn't be able to parse it.
@big-andy-coates big-andy-coates requested a review from a team as a code owner September 27, 2019 10:53
Copy link
Contributor

@purplefox purplefox left a comment

Choose a reason for hiding this comment

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

LGTM

@big-andy-coates big-andy-coates merged commit 3b23fd6 into confluentinc:master Sep 27, 2019
@big-andy-coates big-andy-coates deleted the unordered_table_elements branch September 27, 2019 14:35
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.

2 participants