-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat: Ability to explain an executed request #1188
Merged
Merged
Changes from all commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
074634f
PR: Add ability to specify execute explain request
shahzadlone 85e13d2
PR: Move `explainRequest` function
shahzadlone ca997d3
PR: Fix a panic that's caused in the new testing frame work when no e…
shahzadlone cad30f6
PR: Specify explain type for explainablePlanNodes interface `Explain`…
shahzadlone 045999e
PR: Split simple & execute logic within Explain()
shahzadlone 9d2d43e
PR: Implement structuring of gathered datapoints
shahzadlone 86f440d
PR: Remove commented typeIndexJoin code
shahzadlone aafb1c0
Add select node execute datapoints
shahzadlone ed5c6c0
PR: Add scan node execute datapoints
shahzadlone 4105fa4
PR: Rename utils file to fixture.go
shahzadlone 5395311
PR: Add testing fixtures to create documents
shahzadlone b807a7f
PR: Add type index join node execute datapoints
shahzadlone 487fbf5
PR: Add average node execute datapoints
shahzadlone 584d35f
PR: Add count node execute datapoints
shahzadlone 467335c
PR: Add sum node execute datapoints
shahzadlone a7966f1
PR: Add toplevel node execute test (no datapoint)
shahzadlone c3ea916
PR: Add create node execute datapoints
shahzadlone 7b735e6
PR: Add delete node execute datapoints
shahzadlone fd76a10
PR: Add dagscan node execute datapoints
shahzadlone 690bc89
PR: Add order node execute datapoints
shahzadlone 4da30a1
PR: Add limit node execute datapoints
shahzadlone 77cffc6
PR: Add update node execute datapoints
shahzadlone 5d8eb56
PR: Add group node execute datapoints
shahzadlone File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
suggestion: It feels a bit wasteful both in terms of execution, and maintenance to have Explain take
explainType
as a param, and then perform the same switch for each node. It might be nicer to instead have two (parameterless) functions on planNodeExplainSimple()
andExplainExecute()
and just do the switch once in explain.goThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is a good point, I think I went this way because I didn't want to add another function to this interface:
Which would then result in another public function on all the explainable nodes:
How strong of a preference do you have for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nothing too strong as it doesnt really affect anything besides the explain code - I just think it would be slightly nicer. If you prefer it as is, for sure keep it as is - you'll almost certainly be working more than me with it :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the potential upside of making it 2 exlicit methods instead of one, is controlling which nodes actually need a "custom" explain implementation, and which can kinda just skate by with either no explain, or a basic
wrappedExplain
which just tracks some basic info that is common across all nodes (like #of invocations, results, etc..).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All good points, will keep in mind to split these outside this PR when implementing
debug
orpredict
explain, keeping as is for now, unless someone has a really strong preference.