You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: airbyte-cdk/java/airbyte-cdk/typing-deduping/src/main/kotlin/io/airbyte/integrations/base/destination/typing_deduping/CatalogParser.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/java/airbyte-cdk/typing-deduping/src/main/kotlin/io/airbyte/integrations/base/destination/typing_deduping/StreamConfig.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/java/airbyte-cdk/typing-deduping/src/test/kotlin/io/airbyte/integrations/base/destination/typing_deduping/CatalogParserTest.kt
Copy file name to clipboardExpand all lines: airbyte-cdk/java/airbyte-cdk/typing-deduping/src/test/kotlin/io/airbyte/integrations/base/destination/typing_deduping/DefaultTyperDeduperTest.kt
+12-6
Original file line number
Diff line number
Diff line change
@@ -913,11 +913,13 @@ class DefaultTyperDeduperTest {
913
913
"overwrite_ns",
914
914
"overwrite_stream"
915
915
),
916
-
mock(),
917
916
DestinationSyncMode.OVERWRITE,
918
917
mock(),
919
918
mock(),
920
-
mock()
919
+
mock(),
920
+
0,
921
+
0,
922
+
0,
921
923
)
922
924
privatevalAPPEND_STREAM_CONFIG=
923
925
StreamConfig(
@@ -929,11 +931,13 @@ class DefaultTyperDeduperTest {
929
931
"append_ns",
930
932
"append_stream"
931
933
),
932
-
mock(),
933
934
DestinationSyncMode.APPEND,
934
935
mock(),
935
936
mock(),
936
-
mock()
937
+
mock(),
938
+
0,
939
+
0,
940
+
0,
937
941
)
938
942
privatevalDEDUPE_STREAM_CONFIG=
939
943
StreamConfig(
@@ -945,11 +949,13 @@ class DefaultTyperDeduperTest {
Copy file name to clipboardExpand all lines: airbyte-cdk/java/airbyte-cdk/typing-deduping/src/test/kotlin/io/airbyte/integrations/base/destination/typing_deduping/DestinationV1V2MigratorTest.kt
+9-5
Original file line number
Diff line number
Diff line change
@@ -77,7 +77,7 @@ class DestinationV1V2MigratorTest {
77
77
migrator:BaseDestinationV1V2Migrator<*>,
78
78
expected:Boolean
79
79
) {
80
-
val config =StreamConfig(STREAM_ID, mock(), destinationSyncMode, mock(), mock(), mock())
80
+
val config =StreamConfig(STREAM_ID, destinationSyncMode, mock(), mock(), mock(), 0, 0, 0)
81
81
val actual = migrator.shouldMigrate(config)
82
82
Assertions.assertEquals(expected, actual)
83
83
}
@@ -88,11 +88,13 @@ class DestinationV1V2MigratorTest {
88
88
val config =
89
89
StreamConfig(
90
90
STREAM_ID,
91
-
mock(),
92
91
DestinationSyncMode.APPEND_DEDUP,
93
92
mock(),
94
93
mock(),
95
-
mock()
94
+
mock(),
95
+
0,
96
+
0,
97
+
0,
96
98
)
97
99
val migrator = makeMockMigrator(true, true, false, false, false)
98
100
val exception =
@@ -112,11 +114,13 @@ class DestinationV1V2MigratorTest {
112
114
val stream =
113
115
StreamConfig(
114
116
STREAM_ID,
115
-
mock(),
116
117
DestinationSyncMode.APPEND_DEDUP,
117
118
mock(),
118
119
mock(),
119
-
mock()
120
+
mock(),
121
+
0,
122
+
0,
123
+
0,
120
124
)
121
125
val handler =Mockito.mock(DestinationHandler::class.java)
122
126
val sql = sqlGenerator.migrateFromV1toV2(STREAM_ID, "v1_raw_namespace", "v1_raw_table")
Copy file name to clipboardExpand all lines: airbyte-cdk/java/airbyte-cdk/typing-deduping/src/testFixtures/kotlin/io/airbyte/integrations/base/destination/typing_deduping/BaseSqlGeneratorIntegrationTest.kt
+40-20
Original file line number
Diff line number
Diff line change
@@ -222,39 +222,47 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
222
222
incrementalDedupStream =
223
223
StreamConfig(
224
224
streamId,
225
-
SyncMode.INCREMENTAL,
226
225
DestinationSyncMode.APPEND_DEDUP,
227
226
primaryKey,
228
227
Optional.of(cursor),
229
-
COLUMNS
228
+
COLUMNS,
229
+
0,
230
+
0,
231
+
0,
230
232
)
231
233
incrementalAppendStream =
232
234
StreamConfig(
233
235
streamId,
234
-
SyncMode.INCREMENTAL,
235
236
DestinationSyncMode.APPEND,
236
237
primaryKey,
237
238
Optional.of(cursor),
238
-
COLUMNS
239
+
COLUMNS,
240
+
0,
241
+
0,
242
+
0,
239
243
)
240
244
241
245
cdcIncrementalDedupStream =
242
246
StreamConfig(
243
247
streamId,
244
-
SyncMode.INCREMENTAL,
245
248
DestinationSyncMode.APPEND_DEDUP,
246
249
primaryKey,
247
250
Optional.of(cursor),
248
-
cdcColumns
251
+
cdcColumns,
252
+
0,
253
+
0,
254
+
0,
249
255
)
250
256
cdcIncrementalAppendStream =
251
257
StreamConfig(
252
258
streamId,
253
-
SyncMode.INCREMENTAL,
254
259
DestinationSyncMode.APPEND,
255
260
primaryKey,
256
261
Optional.of(cursor),
257
-
cdcColumns
262
+
cdcColumns,
263
+
0,
264
+
0,
265
+
0,
258
266
)
259
267
260
268
LOGGER.info("Running with namespace {}", namespace)
@@ -353,11 +361,13 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
353
361
val stream =
354
362
StreamConfig(
355
363
streamId,
356
-
SyncMode.INCREMENTAL,
357
364
DestinationSyncMode.APPEND_DEDUP,
358
365
incrementalDedupStream.primaryKey,
359
366
incrementalDedupStream.cursor,
360
-
incrementalDedupStream.columns
367
+
incrementalDedupStream.columns,
368
+
0,
369
+
0,
370
+
0,
361
371
)
362
372
363
373
createRawTable(streamId)
@@ -962,11 +972,13 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
962
972
val streamConfig =
963
973
StreamConfig(
964
974
streamId,
965
-
SyncMode.INCREMENTAL,
966
975
DestinationSyncMode.APPEND_DEDUP,
967
976
primaryKey,
968
977
Optional.empty(),
969
-
COLUMNS
978
+
COLUMNS,
979
+
0,
980
+
0,
981
+
0,
970
982
)
971
983
createRawTable(streamId)
972
984
createFinalTable(streamConfig, "")
@@ -1369,7 +1381,6 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
1369
1381
val stream =
1370
1382
StreamConfig(
1371
1383
streamId,
1372
-
SyncMode.INCREMENTAL,
1373
1384
DestinationSyncMode.APPEND_DEDUP,
1374
1385
primaryKey,
1375
1386
Optional.of(cursor),
@@ -1387,7 +1398,10 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
1387
1398
generator.buildColumnId("includes$\$doubledollar") to
1388
1399
AirbyteProtocolType.STRING,
1389
1400
generator.buildColumnId("endswithbackslash\\") to AirbyteProtocolType.STRING
1390
-
)
1401
+
),
1402
+
0,
1403
+
0,
1404
+
0,
1391
1405
)
1392
1406
1393
1407
val createTable = generator.createTable(stream, "", false)
@@ -1442,11 +1456,13 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
1442
1456
val stream =
1443
1457
StreamConfig(
1444
1458
modifiedStreamId,
1445
-
SyncMode.INCREMENTAL,
1446
1459
DestinationSyncMode.APPEND_DEDUP,
1447
1460
java.util.List.of(columnId),
1448
1461
Optional.of(columnId),
1449
-
linkedMapOf(columnId to AirbyteProtocolType.STRING)
1462
+
linkedMapOf(columnId to AirbyteProtocolType.STRING),
1463
+
0,
1464
+
0,
1465
+
0,
1450
1466
)
1451
1467
1452
1468
val createTable = generator.createTable(stream, "", false)
@@ -1475,14 +1491,16 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
1475
1491
val stream =
1476
1492
StreamConfig(
1477
1493
streamId,
1478
-
SyncMode.INCREMENTAL,
1479
1494
DestinationSyncMode.APPEND,
1480
1495
emptyList(),
1481
1496
Optional.empty(),
1482
1497
linkedMapOf(
1483
1498
generator.buildColumnId("current_date") to AirbyteProtocolType.STRING,
1484
1499
generator.buildColumnId("join") to AirbyteProtocolType.STRING
1485
-
)
1500
+
),
1501
+
0,
1502
+
0,
1503
+
0,
1486
1504
)
1487
1505
1488
1506
val createTable = generator.createTable(stream, "", false)
@@ -1523,11 +1541,13 @@ abstract class BaseSqlGeneratorIntegrationTest<DestinationState : MinimumDestina
1523
1541
val stream =
1524
1542
StreamConfig(
1525
1543
streamId,
1526
-
SyncMode.INCREMENTAL,
1527
1544
DestinationSyncMode.APPEND,
1528
1545
emptyList<ColumnId>(),
1529
1546
Optional.empty(),
1530
-
LinkedHashMap()
1547
+
LinkedHashMap(),
1548
+
0,
1549
+
0,
1550
+
0,
1531
1551
)
1532
1552
1533
1553
val createTable = generator.createTable(stream, "", false)
0 commit comments