Skip to content

Shared: Add a qlpack with a parameterized module defining type-trackers. #11521

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

Merged
merged 4 commits into from
Dec 6, 2022

Conversation

aschackmull
Copy link
Contributor

@aschackmull aschackmull commented Dec 1, 2022

There's still some followup work to be done here to allow a proper join-order in the call-graph-recursive case, but this should support the regular linear-recursive use-cases. (The interface has been prepared for this case mirroring the Ruby/Python setup.)

Note that for TypeBackTracker.step I've switched the meaning of this and result to match the qldoc (keeping the existing order was simply too confusing). Since most use-cases are wrapped in the language-specific backtrack predicates then the switch should be easily adapted.

Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

Some minor comments, otherwise LGTM.

Copy link
Contributor

@hvitved hvitved left a comment

Choose a reason for hiding this comment

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

One final question.

@@ -753,7 +770,7 @@ module TypeTracking<TypeTrackingInput I> {
* A node on a path that is reachable from a source. This is a pair of a
* `Node` and a `TypeTracker`.
*/
class PathNode extends TPathNode {
class PathNodeFwd extends TPathNode {
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to expose this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Otherwise I'll have to duplicate all its members. I thought a bit about coming up with a design that left this private, but this seemed the simplest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants