cli: Fix "result merge" when filter ids include table index
The "human readable id" format, used to identify benchmarks, swprofiles and suts in the command line interface, is usually just the name that the user provided in the plan (in the case of swprofile and sut) or "suite/name" in the case of benchmark. But these names are not guaranteed to be unique. If there are multiple objects of the same type with the same name in the resultstore, the we suffix ":", where is the unique integer id in the resultstore. That ensures we always have a unique and friendly way to refer to these objects.
But it turns out that "result merge" was buggy and did not correctly filter for the ":" case. This was previously implemented with extra, pre-calculated columns in the tables, which was intended to simplify the filtering. But the columns were precalculated prior to inserting the object so the id was None at that point, meaning the column ended up with "/:None" in the case of benchmark. For sut and swprofile, the problem was even worse as the column was misnamed due to a copy/paste error causing the column to always be NULL.
So let's get rid of those pre-computed columns and just complicate the filter so that it can concatenate and compare on the fly.
We deliberately allow to be provided as the filter even when there are multiple objects with . In this case the filter will match all of them.
Fixes: a869c532 ("cli: Implement resultstore abstraction around database") Signed-off-by: Ryan Roberts ryan.roberts@arm.com