cockroachdb / cockroachdb/cockroach

changefeedccl: support for changefeeds with queries on tables with >1 family

Open
#127,761 2 comments 0 reactions 0 assignees View on GitHub
A-cdc branch-master C-bug docs-done T-cdc
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

The following should work, but doesn't:

```
> create table cftest (id int primary key, data text, family f1 (id), family f2 (data));

> CREATE CHANGEFEED INTO 'webhook-https://localhost:9090?insecure_tls_skip_verify=true' WITH updated, split_column_families as select data from cftest;
```

this creates a job, but it fails. logs:

```
W240726 18:22:28.811051 22049 ccl/changefeedccl/changefeed_stmt.go:1291 ⋮ [T1,Vsystem,n1,job=‹CHANGEFEED id=989422368960348161›] 441 Changefeed job 989422368960348161 encountered transient error: expressions can't reference columns from more than one column family (attempt 2)
```

this should work because the column that is selected is only one family's worth.

(without split_column_families option, the create fails with `ERROR: CHANGEFEED targeting a table (cftest) with multiple column families requires WITH split_column_families and will emit multiple events per row.`)

we should also document that this doesn't work currently in https://www.cockroachlabs.com/docs/v24.1/changefeeds-on-tables-with-column-families

Jira issue: CRDB-40585

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.