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

describe endpoint: source inference #5139

Merged
merged 1 commit into from
Jun 17, 2024
Merged

describe endpoint: source inference #5139

merged 1 commit into from
Jun 17, 2024

Conversation

mattnibs
Copy link
Collaborator

Update the describe endpoint to include whether or not the source of a query was inferred.

@mattnibs mattnibs changed the title describe endpoint: source inferrence describe endpoint: source inference Jun 10, 2024
@mattnibs mattnibs marked this pull request as ready for review June 10, 2024 23:40
@mattnibs mattnibs requested a review from a team June 10, 2024 23:41
URI string `json:"uri"`
Kind string `json:"kind"`
URI string `json:"uri"`
Inferred bool `json:"inferred"`
Copy link
Member

Choose a reason for hiding this comment

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

Won't this always be false for a path? If so, is there any reason to keep it?

Suggested change
Inferred bool `json:"inferred"`

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I mean technically you'll never use this endpoint for non-pools but I left that in for completion and because you might want to use this package to inspect source of a different kind. But to your point path can be inferred. At least on the semantic side if no source exists we prepend &dag.DefaultScan{Kind: "DefaultScan"} to the sequence.

compiler/describe/analyze.go Outdated Show resolved Hide resolved
Update the describe endpoint to include whether or not the source of a
query was inferred.
@mattnibs mattnibs merged commit d217ed8 into main Jun 17, 2024
3 checks passed
@mattnibs mattnibs deleted the describe-inferred branch June 17, 2024 20:25
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.

2 participants