Skip to content

Commit e99feec

Browse files
committed
cdc - add support of tsquery type
1 parent d789efa commit e99feec

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

airbyte-integrations/bases/debezium/src/main/java/io/airbyte/integrations/debezium/internals/PostgresConverter.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class PostgresConverter implements CustomConverter<SchemaBuilder, Relatio
2323
private final String[] BIT_TYPES = {"BIT", "VARBIT"};
2424
private final String[] MONEY_ITEM_TYPE = {"MONEY"};
2525
private final String[] GEOMETRICS_TYPES = {"BOX", "CIRCLE", "LINE", "LSEG", "POINT", "POLYGON", "PATH"};
26-
private final String[] TEXT_TYPES = {"VARCHAR", "VARBINARY", "BLOB", "TEXT", "LONGTEXT", "TINYTEXT", "MEDIUMTEXT", "INVENTORY_ITEM", "TSVECTOR"};
26+
private final String[] TEXT_TYPES = {"VARCHAR", "VARBINARY", "BLOB", "TEXT", "LONGTEXT", "TINYTEXT", "MEDIUMTEXT", "INVENTORY_ITEM", "TSVECTOR", "TSQUERY"};
2727

2828
@Override
2929
public void configure(final Properties props) {}

airbyte-integrations/connectors/source-postgres/src/test-integration/java/io/airbyte/integrations/io/airbyte/integration_tests/sources/CdcPostgresSourceDatatypeTest.java

+8
Original file line numberDiff line numberDiff line change
@@ -533,6 +533,14 @@ protected void initTests() {
533533
.addInsertValues("to_tsvector('The quick brown fox jumped over the lazy dog.')")
534534
.addExpectedValues("'brown':3 'dog':9 'fox':4 'jumped':5 'lazy':8 'over':6 'quick':2 'the':1,7")
535535
.build());
536+
537+
addDataTypeTestData(
538+
TestDataHolder.builder()
539+
.sourceType("tsquery")
540+
.airbyteType(JsonSchemaType.STRING)
541+
.addInsertValues("null", "'fat & (rat | cat)'::tsquery", "'fat:ab & cat'::tsquery")
542+
.addExpectedValues(null, "'fat' & ( 'rat' | 'cat' )", "'fat':AB & 'cat'")
543+
.build());
536544
}
537545

538546
}

0 commit comments

Comments
 (0)