[OSSTEST,v2,41/41] duration_estimator: Clarify recentflights query a bit
diff mbox series

Message ID 20200731113820.5765-42-ian.jackson@eu.citrix.com
State New
Headers show
Series
  • Performance work
Related show

Commit Message

Ian Jackson July 31, 2020, 11:38 a.m. UTC
The condition on r.job is more naturally thought of as a join
condition than a where condition.  (This is an inner join, so the
semantics are identical.)

Also, for clarity, swap the flight and job conditions round, so that
the ON clause is a series of r.thing = otherthing.

No functional change.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
CC: George Dunlap <George.Dunlap@citrix.com>
---
v2: New patch.
---
 Osstest/Executive.pm | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

Comments

George Dunlap July 31, 2020, 2:04 p.m. UTC | #1
> On Jul 31, 2020, at 12:38 PM, Ian Jackson <ian.jackson@eu.citrix.com> wrote:
> 
> The condition on r.job is more naturally thought of as a join
> condition than a where condition.  (This is an inner join, so the
> semantics are identical.)
> 
> Also, for clarity, swap the flight and job conditions round, so that
> the ON clause is a series of r.thing = otherthing.
> 
> No functional change.
> 
> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>

Reviewed-by: George Dunlap <george.dunlap@citrix.com>

Patch
diff mbox series

diff --git a/Osstest/Executive.pm b/Osstest/Executive.pm
index 8e4c5b9a..a69c624f 100644
--- a/Osstest/Executive.pm
+++ b/Osstest/Executive.pm
@@ -1153,10 +1153,10 @@  sub duration_estimator ($$;$$) {
 		     FROM flights f
                      JOIN jobs j USING (flight)
                      JOIN runvars r
-                             ON  f.flight=r.flight
+                             ON  r.flight=f.flight
+                            AND  r.job=j.job=
                             AND  r.name=?
-                    WHERE  j.job=r.job
-                      AND  f.blessing=?
+                    WHERE  f.blessing=?
                       AND  f.branch=?
                       AND  j.job=?
                       AND  r.val=?