FoundationDB/fdb-record-layer

Cascades throws Verify exception if a `KeyExpression`'s key is not primitive

Opened this issue · 0 comments

It is possible to have a KeyExpression whose key is referencing a complex type. For example:

[Field { 'A' None}/Field { 'B' None}, Field { 'A' None}/Field { 'C' None}]

It is possible that C is a non-primitive (and non-enum) type. This is valid as long as there is a special code path that understands how to ser/de this field via a special Tuple encoding.

However, this is not something that Cascades expects, and throws an exception when it encounters such key when attempting to create a create a plan from the corresponding MatchCandidate:

Instead, Cascades should have an extra logic to handle this, and more importantly, ignore any KeyExpression it can not handle instead of throwing an exception safeguarding against potential evolution in KeyExpression semantics that it can not immediately deal with.