@c960657 opened this Pull Request on May 31st 2018 Contributor

As discussed in #12778, the table sort in Piwik\DataAccess\LogQueryBuilder\JoinGenerator should be stable for more reliable testing.

In case the order of two joins is irrelevant, they are now sorted by the table alias which should be unique. This makes the sorting identical in PHP 5 and PHP 7.

@diosmosis commented on June 1st 2018 Member

Looks like some other tests need to be updated.

@sgiehl commented on June 11th 2018 Member

Still some failures in integration tests. Seems the join generator results in an invalid query?

@c960657 commented on June 11th 2018 Contributor

I realised that using uasort() and friends will simply not work. The problem is that these functions assume transitivity, i.e. if the callback reports that A < B and B < C (i.e. A depends on B, and B depends on C), then it should also report that A < C, but it doesn't.

I think we need to implement a topological sort.

@sgiehl commented on October 30th 2018 Member

closing in favor of #13634

This Pull Request was closed on October 30th 2018
Powered by GitHub Issue Mirror