Open thtruo opened 2 years ago
The test case here might be useful to understand when working on this: https://github.com/cockroachdb/cockroach/blob/f67fd0e2ddcf5297ddfda14c93b1eef3d901e51c/pkg/sql/parser/testdata/create_type#L25-L31
It looks like the code is treating the enum values as "identifiers" but perhaps it should be treating them as "literals."
Still, I would have expected the telemetry logging to redact identifiers, so perhaps the problem is somewhere else.
Describe the problem First noticed by @vy-ton
Our telemetry logs do not currently redact user ENUM values. Here's an example query:
CREATE TYPE ‹×›.‹×›.‹×› AS ENUM ('STARTED', 'PICKUP', 'FINISHED', 'CANCELED')
Expected behavior
ENUM values are literals and therefore should be redacted from the SQL query being logged for the
[sampled_query](CREATE TYPE ‹×›.‹×›.‹×› AS ENUM ('STARTED', 'PICKUP', 'FINISHED', 'CANCELED', 'LOCKED_FOR_ORDERS', 'RUNNING_LATE'))
eventJira issue: CRDB-13597
Epic CRDB-37533