-
Notifications
You must be signed in to change notification settings - Fork 4.1k
cdc: cannot use UDT cast in changefeed expression #90714
Copy link
Copy link
Closed
Labels
A-cdcChange Data CaptureChange Data CaptureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-cdc
Description
When you create a changefeed expression which references UDTs, some weird behavior occurs:
CREATE TYPE status AS ENUM ('inactive', 'active');
CREATE TYPE priority AS ENUM ('high', 'low');
CREATE TABLE foo (
a INT PRIMARY KEY,
b status,
c priority,
FAMILY only_b (b),
FAMILY only_c (c)
);
root@localhost:26257/defaultdb> CREATE CHANGEFEED WITH split_column_families AS SELECT 'inactive'::status, c FROM foo;
ERROR: undefined object with OID 100113
SQLSTATE: 42704
Also this:
root@localhost:26257/defaultdb> CREATE CHANGEFEED WITH split_column_families, schema_change_policy='stop' AS SELECT 'inactive'::status from foo;
ERROR: expressions can't reference columns from more than one column family
SQLSTATE: 22023
Neither of these errors should happen since the changefeed expressions are valid.
Jira issue: CRDB-20905
Epic CRDB-17161
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
A-cdcChange Data CaptureChange Data CaptureC-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.T-cdc