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

refactor: push Connect schema down #6200

Merged
merged 5 commits into from
Sep 16, 2020

Commits on Sep 11, 2020

  1. fix: register correct unwrapped schema

    This commit fixes several issues and refactors a lot of the serde code around wrapping and unwrapping single values.
    
    The main issues being fixed are:
      1. allow each format to define if it supported wrapping and/or unwrapping. (Not possible with current design)
      2. pass the correct wrapping / unwrapping flags are passed to key vs value formats when creating serde. (bug in code passes same SerdeOptions to key and value).
      3. register the correct wrapped / unwrapped schema with the SR. (bug in existing code meant registered format is always wrapped).
    
    At the same time, the way wrapping / unwrapping was handled in the code wasn't great. Formats like `JSON` needed to be able to handle both wrapped and unwrapped schemas and values, depending on whether the user _explicitly_ set wrapping or unwrapping, vs the default behaviour of the format. This commit refactors the code such that the format will always be passed the a consistent schema and the set of serde features the format should use when creating the serde. This simplifies things and paves the way to user-define-serde.
    big-andy-coates committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    a7f23ff View commit details
    Browse the repository at this point in the history
  2. test: historic plans

    big-andy-coates committed Sep 11, 2020
    Configuration menu
    Copy the full SHA
    8cf7cf1 View commit details
    Browse the repository at this point in the history

Commits on Sep 14, 2020

  1. Configuration menu
    Copy the full SHA
    7c764c7 View commit details
    Browse the repository at this point in the history
  2. refactor: push ConnectSchema down

    Following on from the fixes and refactors done in confluentinc#6188, this commit pushes down the use of the Connect schema type to lower levels of the code. Higher levels of the code now deal with `LogicalSchema`, `PersistentSchema` or just a `List<SimpleColumn>`.
    
    This moves us closer to removing the Connect schema from the code base, except in the Serde code that deals with connect formats.
    
    `LogicalSchema` and `PersistentSchema` no longer know about the Connect schema type. Calls to retrieve the Connect schema from these types have been replaced with a util function that can convert a list of columns into a Struct Connect schema.  As more code moves away from the Connect schema these util function calls will slowly be removed.
    big-andy-coates committed Sep 14, 2020
    Configuration menu
    Copy the full SHA
    6722928 View commit details
    Browse the repository at this point in the history

Commits on Sep 15, 2020

  1. Configuration menu
    Copy the full SHA
    db6dbe6 View commit details
    Browse the repository at this point in the history