Commit 4b63fea
use RecordBuilders in CustomDimensions plugin (matomo-org#20720)
* introduce RecordBuilder concept and re-organize Goals archiving code via RecordBuilders
* fix loop iteration bug
* split ecommerce records recordbuilder into 3 separate records
* make sure Goals::getRecordMetadata() behaves like old archiver code
* make sure recordbuilder archive processor is restored after being used since archiving is a recursive process
* just make ArchiveProcessor a parameter
* check for plugin before calling buildMultiplePeriod()
* do not invoke record builders if archiver has no plugin (happens during tests)
* insert empty DataTables (as this appears to be the existing behavior before this change)
* add RecordBuilder class name to aggregation query hint
* clear up in-source todo
* attempt only archiving requested report if range archive and the record needed is created by a RecordBuilder
* refactor ArchiveSelector::getArchiveIds() to provide result with string keys
* when all found archives are partial archives, check that requested data is present within them. if some are not present, only archive those in a new partial archive.
* return correct value in Model::getRecordsContainedInArchives()
* fix if formatting
* existingArchives can be falsy
* existing archives can be null if the check is not relevant to the current archive request
* do not archive dependent segments if only processing the specific requested report
* fix more tests
* fix LoaderTest
* make sure if archiving specific reports for a single plugin that archiver class instances will not be created
* add filterRecordBuilders event
* if it looks like the requested records are numeric, prioritize the numeric archive table, otherwise blob archive table
* fix copy-paste error
* add dummy test for numeric values
* add test for partial archiving of numeric records for ranges and fix typo causing this to fail
* lessen code redundancy in Archive.php, use Piwik\\Request and do not yet mark RecordBuilder as api
* fix type hint
* fix php-cs errors
* fix failing tests
* fix failing tests (really)
* Add Archiver::getDependentSegmentsToArchive() so plugins do not have to implement aggregation methods in Archiver to process dependent archives.
* move sitesearch category archiving to record builder
* unfinished
* move rest of actions archiving to ActionReports + add option for blob Records to set custom column aggregation ops
* simplify, add typehints and get simple tests to pass
* only do recursive row count in RecordBuilder if there is a numeric record that depends on it
* fix isEnabled calls
* only add idarchive to Archive.php idarchive cache if it is not already there (makes debugging a little less confusing)
* remove unneeded TODO
* when forcing new archive because timestamp is too old, do not report any existing archives
* report no existing archives if done flag is different + add tests
* update uses of ARCHIVE_DEPENDENT static variable
* array intersect instead of array dif
* ArchivingHelper::updateActionsTableWithRowQuery() needs access to every report being built in case the action type is NULL
* should never insert datatable maps
* change ordering of row deletion
* use correct re-introduced variable
* fix ranking query override
* fix OneVisitorOneWebsiteSeveralDaysDateRangeArchivingTest
* one more test failure fix
* fix one more test
* move content archiving code to RecordBuilder
* start on using record builders for custom dimensions
* remove comment
* remove unused imports
* remove unused imports
* make sure when numeric records that depend on blob records are archived, the blob records archived first
* remove unneeded unset
* handle ranking query summary row
* ranking query can be null
* ignore interactions that do not have an impression
* fix analyze archive table test
* handle rankingquery summary row + convert values to float since they can sometimes be strings like "0.000"
* accidentally fixing BlobReportLimitingTest. maybe.
* remove no longer needed DataArray subclass
* fix phpcs
* remove unneeded newline
* add clarifying comment
* move datatable modification methods to DataTable & Row since it will probably come up in review
* use new methods in DataTable, Row
* fix unrefactored function calls
* fix copy paste errors
* allow using custom column aggregation ops when calling new DataTable methods
* add newline for ContentRecords
* newline
* use siteAware cache for RecordBuilder array
* better typehints in RecordBuilder
* allow dependent segments to specific different plugin than the one containing the archiver
* add typehint
* return summed row in Row::sumRowWithLabelToSubtable()
* allow descendents of RecordBuilder to manually insert records if needed
* ignore any records that are not declared in the record metadata (which can happen, for instance, when a goal has been deleted but is still referred to in log data)
* apply review feedback
* remove stray debugging change
* Update variable name for consistency
* Remove unnecessary array_filter since a valid class name never has an empty segment
* Add TODOs
* add comment on why we look for data within partial archives prior to reporting whether archives were found or not
* typehint fixes + make insertBlobRecord (formerly insertRecord) protected for use in RecordBuilders that need to manually insert data
* more typehints
* in aggregateNumericMetrics() allow operationsToApply to be array mapping column name to op
* apply review feedback
---------
Co-authored-by: Stefan Giehl <[email protected]>
Co-authored-by: Michal Kleiner <[email protected]>1 parent e13e124 commit 4b63fea
7 files changed
Lines changed: 439 additions & 366 deletions
File tree
- core
- DataTable/Filter
- plugins/CustomDimensions
- RecordBuilders
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
378 | 379 | | |
379 | 380 | | |
380 | 381 | | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
393 | | - | |
394 | | - | |
395 | | - | |
396 | | - | |
397 | | - | |
398 | | - | |
399 | | - | |
400 | | - | |
401 | | - | |
402 | | - | |
403 | | - | |
404 | | - | |
405 | | - | |
| 382 | + | |
406 | 383 | | |
407 | 384 | | |
408 | 385 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
581 | 582 | | |
582 | 583 | | |
583 | 584 | | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
| 614 | + | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
| 628 | + | |
| 629 | + | |
| 630 | + | |
| 631 | + | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
| 635 | + | |
| 636 | + | |
| 637 | + | |
| 638 | + | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
584 | 647 | | |
0 commit comments