Skip to content

Commit e3f42f4

Browse files
committed
fix nil exception
1 parent 4dc300f commit e3f42f4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

tools/greenplum-to-pg-tests/cmd/check_pg_queries.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -459,7 +459,12 @@ func checkQuery(stat *QueryStats, rules Rules, dbPool *internal.YdbPool, queryTe
459459
}
460460
}
461461

462-
reason = fmt.Sprintf("%v (%v): %#v", ydbErr.Name(), ydbErr.Code(), unknownIssues)
462+
if ydbErr == nil {
463+
reason = fmt.Sprintf("non ydb err: %v", err)
464+
} else {
465+
reason = fmt.Sprintf("%v (%v): %#v", ydbErr.Name(), ydbErr.Code(), unknownIssues)
466+
467+
}
463468
stat.CountAsUnknown(reason, queryText)
464469
return reason, checkResultErrUnknown
465470
}

0 commit comments

Comments
 (0)