sebastienros / yessql

A .NET document database working on any RDBMS
MIT License
1.22k stars 198 forks source link

Operand data type bit is invalid for max operator #472

Open mariojsnunes opened 1 year ago

mariojsnunes commented 1 year ago

Getting "Operand data type bit is invalid for max operator" error when using this on a query: x.With<BooleanFieldIndex>(field => field.ContentField == nameof(BaseContentPart.Property)).OrderByDescending(x => x.Boolean) Started working again after I commented it.

Is there any change in the past 2-3 months could cause this? I updated OC to the latest preview today.

sebastienros commented 1 year ago

Yes, we are using GROUP BY now to eliminate duplicate documents. I will add a similar unit test.

mariojsnunes commented 1 year ago

Hi there. Is there any plans to support ordering boolean fields again?

sebastienros commented 1 year ago

Can you give it a try and attempt to fix it?

mariojsnunes commented 1 year ago

@sebastienros Sure. I've made a PR #503 to try to replicate the issue. Can you allow for tests to run?

jtkech commented 1 year ago

Done