TTL Job Description does not quote Key Column #142986
Labels
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
E-starter
Might be suitable for a starter project for new employees or team members.
good first issue
T-sql-foundations
SQL Foundations Team (formerly SQL Schema + SQL Sessions)
Describe the problem
The schema uses quoted identifiers for Database, Schema, Table and Column names.
The description of a TTL job in the crdb_internal.jobs table and consequently the DB Console -> Jobs -> Job Detail page do not quote all column names. The Database, Schema and Table names are quoted correctly, it is just the PK column name(s) that is not.
This makes cutting and pasting the query for testing more complicated than it needs to be.
To Reproduce
-- wait for a minute
--- The output shows the Id columns is not quoted.
ttl for "CaseSensitiveDB"."CaseSensitiveSchema"."Dogs"
-- for each span, iterate to find rows:
SELECT Id
FROM "CaseSensitiveDB"."CaseSensitiveSchema"."Dogs"
AS OF SYSTEM TIME INTERVAL '-30 seconds'
WHERE ((("CreatedDate" + INTERVAL '2 months')) <= $1)
AND (
(Id >= $3)
)
AND (
(Id <= $2)
)
ORDER BY Id ASC
LIMIT 500
-- then delete with:
DELETE FROM "CaseSensitiveDB"."CaseSensitiveSchema"."Dogs"
WHERE ((("CreatedDate" + INTERVAL '2 months')) <= $1)
AND (Id) IN (($2))
(1 row)
Expected behavior
All columns should be quoted as per the customers defined schema.
Additional data / screenshots
Screen shot of DB Console attached.
If applicable, add screenshots to help explain your problem.
Environment:
Additional context
What was the impact?
This makes cutting and pasting the TTL queries for testing more complicated than it needs to be.
Jira issue: CRDB-48614
The text was updated successfully, but these errors were encountered: