FoundationDB / fdb-record-layer

A record-oriented store built on FoundationDB
Apache License 2.0
575 stars 102 forks source link

Evaluating a query component for equality comparison with a enum constant fails #763

Open MMcM opened 4 years ago

MMcM commented 4 years ago

For example, remove the index definition from FDBRecordStoreQueryTest.enumFields and still get the same results (if not the same plan).

com.apple.foundationdb.record.RecordCoreException: Tried to compare non-comparable object class com.google.protobuf.Descriptors$EnumValueDescriptor
rickysaltzer commented 4 years ago

FWIW - As a workaround I've added an index on my enum field, which allows me to successfully query it.

alecgrieser commented 4 years ago

Great! I suppose it's also possible that your enum field filter is better executed (performance wise) with the index, too, though this bug should be fixed.