Skip to content

Commit 1d8250f

Browse files
committed
crdb_interal: always report non-null fraction fraction_completed
We have code that assumes it can always scan this into a float, which isn't the case when it is NULL. Epic: none Release note: None
1 parent fc759fd commit 1d8250f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pkg/sql/crdb_internal.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ var crdbInternalJobsView = virtualSchemaView{
10351035
j.created::timestamptz,
10361036
j.finished,
10371037
greatest(j.created, j.finished, p.written, s.written)::timestamptz AS modified,
1038-
p.fraction as fraction_completed,
1038+
coalesce(p.fraction, 0)::FLOAT as fraction_completed,
10391039
p.resolved as high_water_timestamp,
10401040
coalesce(j.error_msg, '') as error,
10411041
j.claim_instance_id as coordinator_id

pkg/sql/opt/exec/execbuilder/testdata/explain

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ distribution: local
121121
vectorized: true
122122
·
123123
• sort
124-
│ order: -column70,-created
124+
│ order: -column71,-created
125125
126126
└── • render
127127

0 commit comments

Comments
 (0)