VTab BestIndex sets .omit when Used=true
cheezypoofs opened this issue · 0 comments
https://github.com/mattn/go-sqlite3/blob/master/sqlite3_opt_vtable.go#L467
I'm willing to submit a PR, but wanted to first see if this was viewed as a misinterpretation of the documentation. I got the impression that setting .omit is only for specifying that you will take care of the constraint and you're hinting to sqlite that it can skip the step if it wants.
From: sqlite
it can try to suppress that double-check by setting aConstraintUsage[].omit
I guess I was hoping that one could set .Used = true
in order to get hints and receive the right-side values in Filter()
, but implement a best-effort filter and not a definite filter.
Would we be open to changing the behavior here to say that .Used = true
just means you want to use the constraint and you can still receive it in filter, and we can add a separate .Omit = true
to be more explicit about the omit? Or maybe to preserve backward compat with existing behavior we can add something like .UsedNoOmit = true
.
Thoughts?