@@ -1913,8 +1913,13 @@ func TestNoBackfillAfterNonTargetColumnDrop(t *testing.T) {
1913
1913
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))` )
1914
1914
sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
1915
1915
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
+
1916
1921
// 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 ... )
1918
1923
defer closeFeed (t , cf )
1919
1924
assertPayloads (t , cf , []string {
1920
1925
`hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
@@ -1951,8 +1956,12 @@ func TestChangefeedColumnDropsWithFamilyAndNonFamilyTargets(t *testing.T) {
1951
1956
sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
1952
1957
sqlDB .Exec (t , `INSERT INTO nofams values (0, 'a', 'b', 'c')` )
1953
1958
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
+ }
1954
1963
// 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 ... )
1956
1965
defer closeFeed (t , cf )
1957
1966
assertPayloads (t , cf , []string {
1958
1967
`hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
@@ -2000,8 +2009,13 @@ func TestChangefeedColumnDropsOnMultipleFamiliesWithTheSameName(t *testing.T) {
2000
2009
sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
2001
2010
sqlDB .Exec (t , `INSERT INTO alsohasfams values (0, 'a', 'b', 'c')` )
2002
2011
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
+
2003
2017
// 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 ... )
2005
2019
defer closeFeed (t , cf )
2006
2020
assertPayloads (t , cf , []string {
2007
2021
`hasfams.b_and_c: [0]->{"after": {"b": "b", "c": "c"}}` ,
@@ -2089,8 +2103,13 @@ func TestNoStopAfterNonTargetAddColumnWithBackfill(t *testing.T) {
2089
2103
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))` )
2090
2104
sqlDB .Exec (t , `INSERT INTO hasfams values (0, 'a', 'b', 'c')` )
2091
2105
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
+
2092
2111
// 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 ... )
2094
2113
2095
2114
defer closeFeed (t , cf )
2096
2115
assertPayloads (t , cf , []string {
@@ -3323,7 +3342,7 @@ func TestChangefeedEachColumnFamily(t *testing.T) {
3323
3342
sqlDB .Exec (t , `DELETE FROM foo WHERE a>0` )
3324
3343
3325
3344
// 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 ... )
3327
3346
defer closeFeed (t , fooWithDiff )
3328
3347
sqlDB .Exec (t , `DELETE FROM foo WHERE a=0` )
3329
3348
assertPayloads (t , fooWithDiff , []string {
@@ -3336,7 +3355,7 @@ func TestChangefeedEachColumnFamily(t *testing.T) {
3336
3355
// Table with a second column family added after the changefeed starts.
3337
3356
sqlDB .Exec (t , `CREATE TABLE bar (a INT PRIMARY KEY, FAMILY f_a (a))` )
3338
3357
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 ... )
3340
3359
defer closeFeed (t , bar )
3341
3360
assertPayloads (t , bar , []string {
3342
3361
`bar: [0]->{"after": {"a": 0}}` ,
0 commit comments