This is an automated email from the ASF dual-hosted git repository.
diwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-flink-connector.git
The following commit(s) were added to refs/heads/master by this push:
new 8d6ea6e [fix] fix BPCHAR type mapping for postgres (#228)
8d6ea6e is described below
commit 8d6ea6e140fb35145427820d66314f6fb637a26e
Author: leisheng <[email protected]>
AuthorDate: Wed Nov 15 22:05:23 2023 +0800
[fix] fix BPCHAR type mapping for postgres (#228)
---
.../java/org/apache/doris/flink/tools/cdc/postgres/PostgresType.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/postgres/PostgresType.java
b/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/postgres/PostgresType.java
index 5c2feff..b77496d 100644
---
a/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/postgres/PostgresType.java
+++
b/flink-doris-connector/src/main/java/org/apache/doris/flink/tools/cdc/postgres/PostgresType.java
@@ -88,9 +88,6 @@ public class PostgresType {
return DorisType.FLOAT;
case FLOAT8:
return DorisType.DOUBLE;
- case BPCHAR:
- Preconditions.checkNotNull(precision);
- return String.format("%s(%s)", DorisType.CHAR, precision);
case TIMESTAMP:
case TIMESTAMPTZ:
return String.format("%s(%s)", DorisType.DATETIME_V2,
Math.min(precision == null ? 0 : precision, 6));
@@ -100,6 +97,7 @@ public class PostgresType {
return DorisType.BOOLEAN;
case BIT:
return precision == 1 ? DorisType.BOOLEAN : DorisType.STRING;
+ case BPCHAR:
case VARCHAR:
Preconditions.checkNotNull(precision);
return precision * 3 > 65533 ? DorisType.STRING :
String.format("%s(%s)", DorisType.VARCHAR, precision * 3);
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]