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): allow logical schema to have fields in any order #3422

Merged

Conversation

big-andy-coates
Copy link
Contributor

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

Description

Our logical schema should be able to support schemas where the is not key column, no rowtime, or has key columns interleaved with value columns. This is because a projection does not necessarily include key at the start, or at all, or rowtime.

This is necessary for the static query work (or is that a pull query? or a push?) as the query may not include ROWKEY or ROWTIME.

This will also be needed soon for the primitive key work as well.

This PR see's a big change to the LogicalSchema class - it now just has a single collection of NamespacedColumn. The namespace bit distinguishes between metadata, key and value columns.

How to review:

  • Look at changes to LogicalSchema.
  • Look at tests.
  • few other bits and bobs changed. Often off the back of issues found with the other recent change to the logical 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 #")

Our logical schema should be able to support schemas where the is not key column, no rowtime, or has key columns interleaved with value columns.  This is because a projection does not necessarily include key at the start, or at all, or rowtime.
@big-andy-coates big-andy-coates requested a review from a team as a code owner September 26, 2019 15:07
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.

I think this LGTM save one potential 🐞 , hard to know what these changes entail since LogicalSchema is used so pervasively - but if it passes tests then it's good for me!

@agavra agavra requested a review from a team September 26, 2019 18:14
# Conflicts:
#	ksql-common/src/main/java/io/confluent/ksql/schema/ksql/LogicalSchema.java
#	ksql-common/src/test/java/io/confluent/ksql/schema/ksql/LogicalSchemaTest.java
#	ksql-execution/src/test/java/io/confluent/ksql/execution/util/ExpressionTypeManagerTest.java
@big-andy-coates big-andy-coates merged commit d935af3 into confluentinc:master Sep 27, 2019
@big-andy-coates big-andy-coates deleted the unordered_logical branch September 27, 2019 09:23
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