cockroach
cockroach copied to clipboard
jobs: use builtin to synthesize pending session job rows in vtable
This adds a builtin to enumerate jobs pending creation in the current session. It then adds a UNION with a call to this builtin, rather than directly accessing the session in the Go code, to the body of the crdb_internal.jobs vtable, bringing the vtable closer to being just a pure query that can be replaced by a delegate or view.
Additionally, deprecated columns in the vtable, which were always null, are removed.
Release note: none. Epic: none.a
It looks like your PR touches production code but doesn't add or edit any test code. Did you consider adding tests to your PR?
:owl: Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf.
SHOW JOBS (as apposed to adding NULL as trace_id, NULL as execution_errors
These columns already aren't in plain ol SHOW JOBS, right? the conditional they were added in meant they were only in SHOW JOB X / SHOW JOBS x, y, z (and were always null/useless since 25.1).
gonna move on to the auth builtin and then the view which I think is when we'll move the WHERE clause around anyway
TFTR!
bors r+