Skip to content

Commit

Permalink
feat(static): allow logical schema to have fields in any order (#3422)
Browse files Browse the repository at this point in the history
* feat(static): allow logical schema to have fields in any order

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.
  • Loading branch information
big-andy-coates authored Sep 27, 2019
1 parent fe63d21 commit d935af3
Show file tree
Hide file tree
Showing 21 changed files with 371 additions and 271 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,6 @@ public final class SchemaUtil {

private static final char FIELD_NAME_DELIMITER = '.';

private static final ImmutableMap<Schema.Type, String> SCHEMA_TYPE_TO_CAST_STRING =
new ImmutableMap.Builder<Schema.Type, String>()
.put(Schema.Type.INT32, "(Integer)")
.put(Schema.Type.INT64, "(Long)")
.put(Schema.Type.FLOAT64, "(Double)")
.put(Schema.Type.STRING, "(String)")
.put(Schema.Type.BOOLEAN, "(Boolean)")
.build();

private static final Map<Type, BiPredicate<Schema, Schema>> CUSTOM_SCHEMA_EQ =
ImmutableMap.<Type, BiPredicate<Schema, Schema>>builder()
.put(Type.MAP, SchemaUtil::mapCompatible)
Expand Down
Loading

0 comments on commit d935af3

Please sign in to comment.