Skip to content

Commit a255a19

Browse files
committed
cleanup
1 parent de8cc06 commit a255a19

File tree

4 files changed

+2
-28
lines changed

4 files changed

+2
-28
lines changed

airbyte-cdk/bulk/core/base/src/main/kotlin/io/airbyte/cdk/data/JsonCodec.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,7 @@ data class ArrayEncoder<T>(
336336
override fun encode(decoded: List<T>): JsonNode =
337337
Jsons.arrayNode().apply {
338338
for (e in decoded) {
339+
// Note: in generics, T can be nullable!
339340
if (e == null) add(NullCodec.encode(e)) else add(elementEncoder.encode(e))
340341
}
341342
}

airbyte-cdk/bulk/toolkits/source-tests/src/testFixtures/kotlin/io/airbyte/cdk/test/fixtures/tests/FieldTypeMapperTest.kt

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,6 @@ abstract class FieldTypeMapperTest {
241241
return mapOf(
242242
tableName.uppercase() to
243243
values.values.map {
244-
// TODO: don't break existing tests
245-
// Jsons.readTree("""{"${columnName.uppercase()}":$it}""")
246-
// val colName = entityNameDefaultCapitalization.transform(columnName)
247244
Jsons.readTree("""{"${columnName}":$it}""")
248245
}
249246
)
@@ -266,14 +263,6 @@ abstract class FieldTypeMapperTest {
266263

267264
object AnsiSql {
268265

269-
val floatValues =
270-
mapOf(
271-
"null" to "null",
272-
"45.67" to "45.67",
273-
"98.76" to "98.76",
274-
"0.12" to "0.12",
275-
)
276-
277266
val intValues =
278267
mapOf(
279268
"null" to "null",
@@ -357,13 +346,6 @@ object AnsiSql {
357346
"''" to "\"\"",
358347
)
359348

360-
val binary20Values =
361-
mapOf(
362-
"null" to "null",
363-
"X'0123'" to "\"ASMAAAAAAAAAAAAAAAAAAAAAAAA=\"",
364-
"X'0123456789ABCDEF'" to "\"ASNFZ4mrze8AAAAAAAAAAAAAAAA=\"",
365-
)
366-
367349
val dateValues =
368350
mapOf(
369351
"null" to "null",

airbyte-integrations/connectors/source-postgres/src/main/kotlin/io/airbyte/integrations/source/postgres/PostgresSource.kt

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,6 @@ object PostgresSource {
1717
log.info { (File(arg).readText()) }
1818
}
1919
}
20-
val rootPath = "/Users/matt.bayley/dev/airbyte/secrets/airbyte/postgres"
21-
val configPath = "$rootPath/config.json"
22-
val catalogPath = "$rootPath/catalog.json"
23-
val statePath = "$rootPath/state.json"
24-
val checkArgs = arrayOf("--check", "--config", configPath)
25-
val discoverArgs = arrayOf("--discover", "--config", configPath)
26-
val readArgs = arrayOf("--read", "--config", configPath, "--catalog", catalogPath)
27-
AirbyteSourceRunner.run(*readArgs)
20+
AirbyteSourceRunner.run(*args)
2821
}
2922
}

airbyte-integrations/connectors/source-postgres/src/test/kotlin/io/airbyte/integrations/source/postgres/PostgresSourceFieldTypeMapperTest.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ class PostgresSourceFieldTypeMapperTest : FieldTypeMapperTest() {
8888
"'A'" to "\"A\"",
8989
)
9090
)
91-
// TODO: Old version maps BIT to text and BIT[] to Array<Boolean>(?!?)
9291
scalarAndArray(
9392
"BIT(1)",
9493
LeafAirbyteSchemaType.BOOLEAN,
@@ -153,7 +152,6 @@ class PostgresSourceFieldTypeMapperTest : FieldTypeMapperTest() {
153152
LeafAirbyteSchemaType.DATE,
154153
AnsiSql.dateValues.plus(preservedInfinities).mapKeys { "${it.key}::date" }
155154
)
156-
157155
scalarAndArray(
158156
"TIME",
159157
LeafAirbyteSchemaType.TIME_WITHOUT_TIMEZONE,

0 commit comments

Comments
 (0)