Skip to content

Commit

Permalink
Update sql for traceroute test count with newly added schema field (#232
Browse files Browse the repository at this point in the history
)

* Update sanity.go

* Update sanity.go

* Update sanity.go
  • Loading branch information
yachang authored Feb 26, 2020
1 parent c6fba22 commit ab1877a
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions cloud/bq/sanity.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ func GetTableDetail(ctx context.Context, dsExt *dataset.Dataset, table bqiface.T

tracerouteQuery := fmt.Sprintf(`
#standardSQL
SELECT COUNT(DISTINCT ParseInfo.TaskFileName) AS TestCount, COUNT(DISTINCT ParseInfo.TaskFileName) AS TaskFileCount
SELECT COUNT(DISTINCT Parseinfo.Filename) AS TestCount, COUNT(DISTINCT ParseInfo.TaskFileName) AS TaskFileCount
FROM `+"`%s.%s`"+`
%s -- where clause`,
dataset, tableName, where)
Expand Down Expand Up @@ -335,10 +335,8 @@ func (at *AnnotatedTable) checkAlmostAsBig(ctx context.Context, other *Annotated
return ErrTooFewTasks
}

// Check that receiver table contains at least 95% as many tests as
// other table. This may be fewer if the destination table still has dups.
if thisDetail.TestCount < otherDetail.TestCount {
log.Printf("Warning - fewer tests: %s(%d) < %s(%d)\n",
log.Printf("Warning_fewer_tests: %s(%d) < %s(%d)\n",
at.Table.FullyQualifiedName(), thisDetail.TestCount,
other.Table.FullyQualifiedName(), otherDetail.TestCount)
}
Expand Down

0 comments on commit ab1877a

Please sign in to comment.