Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix orderBy var in optional part of where clause #196

Merged
merged 8 commits into from
Sep 7, 2022

Conversation

cap10morgan
Copy link
Contributor

@cap10morgan cap10morgan commented Sep 6, 2022

Fixes FC-1430

I think the error message was missing a "not" it was intended to have all along. Using map for the recursive search of the optional clause would give a collection of bool-ish values instead of one, so I changed that to some instead (like the outer logic uses). And then we fixed several other issues.

@cap10morgan cap10morgan requested review from a team and bplatz September 6, 2022 20:50
(= type :binding) (= (:variable where-smt) variable)
(= type :union) (or (variable-in-where? variable (first (:where where-smt)))
(variable-in-where? variable (second (:where where-smt)))))))
(case type
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this case exhaustive? I sometimes prefer cond unless I know that the case is exhaustive, since it will blow up on a missing case.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's probably what @bplatz was referring to. I think we want it to ignore other types, so I'll add a default that does that.

It should ignore unknown where-smt types
@cap10morgan cap10morgan merged commit 61622b0 into main Sep 7, 2022
@cap10morgan cap10morgan deleted the fix/order-by-var-optional branch September 7, 2022 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants