@@ -1913,8 +1913,13 @@ func TestNoBackfillAfterNonTargetColumnDrop(t *testing.T) {
19131913 sqlDB .Exec (t , `CREATE TABLE hasfams (id int primary key, a string, b string, c string, FAMILY id_a (id, a), FAMILY b_and_c (b, c))` )
19141914 sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
19151915
1916+ var args []any
1917+ if _ , ok := f .(* webhookFeedFactory ); ok {
1918+ args = append (args , optOutOfMetamorphicEnrichedEnvelope {reason : "metamorphic enriched envelope does not support column families for webhook sinks" })
1919+ }
1920+
19161921 // Open up the changefeed.
1917- cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c` )
1922+ cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c` , args ... )
19181923 defer closeFeed (t , cf )
19191924 assertPayloads (t , cf , []string {
19201925 `hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
@@ -1951,8 +1956,12 @@ func TestChangefeedColumnDropsWithFamilyAndNonFamilyTargets(t *testing.T) {
19511956 sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
19521957 sqlDB .Exec (t , `INSERT INTO nofams values (0, 'a', 'b', 'c')` )
19531958
1959+ var args []any
1960+ if _ , ok := f .(* webhookFeedFactory ); ok {
1961+ args = append (args , optOutOfMetamorphicEnrichedEnvelope {reason : "metamorphic enriched envelope does not support column families for webhook sinks" })
1962+ }
19541963 // Open up the changefeed.
1955- cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c, TABLE nofams` )
1964+ cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c, TABLE nofams` , args ... )
19561965 defer closeFeed (t , cf )
19571966 assertPayloads (t , cf , []string {
19581967 `hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
@@ -2000,8 +2009,13 @@ func TestChangefeedColumnDropsOnMultipleFamiliesWithTheSameName(t *testing.T) {
20002009 sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
20012010 sqlDB .Exec (t , `INSERT INTO alsohasfams values (0, 'a', 'b', 'c')` )
20022011
2012+ var args []any
2013+ if _ , ok := f .(* webhookFeedFactory ); ok {
2014+ args = append (args , optOutOfMetamorphicEnrichedEnvelope {reason : "metamorphic enriched envelope does not support column families for webhook sinks" })
2015+ }
2016+
20032017 // Open up the changefeed.
2004- cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c, TABLE alsohasfams FAMILY id_a` )
2018+ cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c, TABLE alsohasfams FAMILY id_a` , args ... )
20052019 defer closeFeed (t , cf )
20062020 assertPayloads (t , cf , []string {
20072021 `hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
@@ -2089,8 +2103,13 @@ func TestNoStopAfterNonTargetAddColumnWithBackfill(t *testing.T) {
20892103 sqlDB .Exec (t , `CREATE TABLE hasfams (id INT PRIMARY KEY, a STRING, b STRING, c STRING, FAMILY id_a (id, a), FAMILY b_and_c (b, c))` )
20902104 sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
20912105
2106+ var args []any
2107+ if _ , ok := f .(* webhookFeedFactory ); ok {
2108+ args = append (args , optOutOfMetamorphicEnrichedEnvelope {reason : "metamorphic enriched envelope does not support column families for webhook sinks" })
2109+ }
2110+
20922111 // Open up the changefeed.
2093- cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c WITH schema_change_policy='stop'` )
2112+ cf := feed (t , f , `CREATE CHANGEFEED FOR TABLE hasfams FAMILY b_and_c WITH schema_change_policy='stop'` , args ... )
20942113
20952114 defer closeFeed (t , cf )
20962115 assertPayloads (t , cf , []string {
@@ -3323,7 +3342,7 @@ func TestChangefeedEachColumnFamily(t *testing.T) {
33233342 sqlDB .Exec (t , `DELETE FROM foo WHERE a>0` )
33243343
33253344 // Deletes send a message for each column family.
3326- fooWithDiff := feed (t , f , `CREATE CHANGEFEED FOR foo WITH split_column_families, diff` )
3345+ fooWithDiff := feed (t , f , `CREATE CHANGEFEED FOR foo WITH split_column_families, diff` , args ... )
33273346 defer closeFeed (t , fooWithDiff )
33283347 sqlDB .Exec (t , `DELETE FROM foo WHERE a=0` )
33293348 assertPayloads (t , fooWithDiff , []string {
@@ -3336,7 +3355,7 @@ func TestChangefeedEachColumnFamily(t *testing.T) {
33363355 // Table with a second column family added after the changefeed starts.
33373356 sqlDB .Exec (t , `CREATE TABLE bar (a INT PRIMARY KEY, FAMILY f_a (a))` )
33383357 sqlDB .Exec (t , `INSERT INTO bar VALUES (0)` )
3339- bar := feed (t , f , `CREATE CHANGEFEED FOR bar` )
3358+ bar := feed (t , f , `CREATE CHANGEFEED FOR bar` , args ... )
33403359 defer closeFeed (t , bar )
33413360 assertPayloads (t , bar , []string {
33423361 `bar: [0]->{"after": {"a": 0}}` ,
0 commit comments