| 525 | } |
| 526 | |
| 527 | func buildStatementSummaryResultMap(results []*storepb.PlanCheckRunResult_Result) map[statementSummaryKey]*storepb.PlanCheckRunResult_Result { |
| 528 | m := map[statementSummaryKey]*storepb.PlanCheckRunResult_Result{} |
| 529 | for _, result := range results { |
| 530 | if result.Type != storepb.PlanCheckType_PLAN_CHECK_TYPE_STATEMENT_SUMMARY_REPORT { |
| 531 | continue |
| 532 | } |
| 533 | instanceID, databaseName, err := common.GetInstanceDatabaseID(result.Target) |
| 534 | if err != nil { |
| 535 | continue |
| 536 | } |
| 537 | m[statementSummaryKey{ |
| 538 | InstanceID: instanceID, |
| 539 | DatabaseName: databaseName, |
| 540 | SheetSHA256: result.SheetSha256, |
| 541 | }] = result |
| 542 | } |
| 543 | return m |
| 544 | } |
| 545 | |
| 546 | func isPlanCheckRunPendingApprovalEvaluation(planCheckRun *store.PlanCheckRunMessage) bool { |
| 547 | if planCheckRun == nil { |