-
Notifications
You must be signed in to change notification settings - Fork 20
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
Context query subscript #791
Merged
Merged
Changes from 65 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
fcee4fb
WIP for parsing context dictionary suscript
suprjinx e5476a6
Fix needed for migrating existing data
suprjinx 8aecc94
Set latest_metric.context_id
suprjinx c9cc2bb
Use AutoMigrate and new unique index for context_id col
suprjinx f08e216
switch back to primary keys
suprjinx 71e8bfb
Create new tables and copy data
suprjinx be16a83
Drop old indexes
suprjinx b83615c
make helper for deleting index if exists
suprjinx 5f90110
Postgres does not relax FK constraints, so we have to supply the real
suprjinx 0c6b35f
Remove the default:0 gorm annotation -- will never work
suprjinx 6b99867
add test to make sure latest_metrics are differentiated by context
suprjinx d850736
lint
suprjinx a1bd805
Clarified comments
suprjinx 7e36e35
Properly consolidate metrics by contiguous key and context
suprjinx e87ff9a
Merge branch 'main' into context-query-subscript
suprjinx de5cbbc
Merge branch 'main' into fix-context-migration-for-upgrades
suprjinx c207009
add dictionary parsing
suprjinx 7160444
add subscript handler for []clause.Expression (which is what the
suprjinx dbb40e2
remove extra blank line
suprjinx 7e91551
DRY up the metric attribute getter
suprjinx db649de
Lint
suprjinx f47cba3
Fix lints
suprjinx e3937fb
Fix another lint
suprjinx da289c6
another lint fix
suprjinx f87e085
fix the metric attribute getter
suprjinx 1012b2c
add support for metric subscript tuple
suprjinx 7979db1
additional test reversing tuple order
suprjinx c4748a0
Move conditions append to the subscript slicer
suprjinx c706d0a
Add tuple test for Postgres
suprjinx f6efd8d
lint
suprjinx e16dd20
WIP refactor to use one latest_metrics join
suprjinx 4545edf
WIP cont'd
suprjinx 108a7e7
Update query parser to handle tuple case
suprjinx 0914330
Fix lint issues
suprjinx 4fa155e
Add row-count verification to migration
suprjinx 77b33bd
refactor migration for tables/indexes map
suprjinx 17e8458
PR cleanup
suprjinx 20b82b0
lint
suprjinx a93f904
Merge branch 'main' into fix-context-migration-for-upgrades
suprjinx a0a5fb8
more lint
suprjinx 633aa4d
Merge branch 'fix-context-migration-for-upgrades' of github.com:suprj…
suprjinx 8a9854f
fix typo
suprjinx 35c2f1a
Merge branch 'fix-context-migration-for-upgrades' into context-query-…
suprjinx 401ad4d
WIP adapting tests
suprjinx ce294f8
Fixed remaining tests by adding joins ordering slice
suprjinx c0479be
Make sure latest_metrics is joined for query parser
suprjinx 26ae1ea
cosmetic query change
suprjinx 76ec123
put lastest_metrics and context joins into the input query
suprjinx d5a84da
adjust query_test, metric and context joins are not created by Filter
suprjinx 55d9fd4
Remove the joinKeys slice
suprjinx 20d1b26
Add joins needed by pq.Filter
suprjinx 3da858e
Merge branch 'main' into context-query-subscript
suprjinx 4fc85e9
Can't have metrics without latest_metrics
suprjinx 755d0fb
Merge branch 'main' into context-query-subscript
suprjinx d79d161
restore unique joins for each metric evaluation
suprjinx 3525982
fix lint and unit tests
suprjinx 6ea1774
comments and a couple of more test cases
suprjinx cdeb399
Comment and additional tests
suprjinx 1c2816e
Don't add new join for metric.context queries
suprjinx c1aefc8
lint
suprjinx 59af0fa
lint
suprjinx 28b9e16
errant capitalization removal
suprjinx fa0b9af
lint
suprjinx 2e5c2b9
use constant for table name
suprjinx f3d8fef
allow "run.metrics[name]" to count as metric selected
suprjinx 682ba0f
error case with joins map
suprjinx 8ec7363
Merge branch 'main' into context-query-subscript
suprjinx 82c6c9e
Merge branch 'main' into context-query-subscript
suprjinx 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
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.
could it be circumstance, when
j := pq.joins[k]
isnil
?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.
i searched for all cases where we append to pq.joins to make sure this isn't possible (using pq.AddJoin ensures this). Added some error-level logging if
joins[k]
is nil.