Skip to content

Commit 80cc2ae

Browse files
committed
fix: postgres money bug
(cherry picked from commit dae5e3c)
1 parent 479d0c3 commit 80cc2ae

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

connectors-common/postgres-core/src/main/java/io/tapdata/connector/postgres/PostgresTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ public Boolean testWalMinerPgto() {
185185
}
186186
}
187187

188-
private static final String WALMINER_PACKAGE_NAME = "walminer_x86_64_v4.11.2";
188+
private static final String WALMINER_PACKAGE_NAME = "walminer_x86_64_v4.12.2";
189189

190190
private boolean deployPgto() {
191191
String toolPath = FileUtil.paths("run-resources", "pg-db", "walminer");

connectors-common/postgres-core/src/main/resources/walminer/walminer_x86_64_v4.11.2.tar.gz renamed to connectors-common/postgres-core/src/main/resources/walminer/walminer_x86_64_v4.12.2.tar.gz

13.6 MB
Binary file not shown.

connectors/postgres-connector/src/main/java/io/tapdata/connector/postgres/PostgresConnector.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -985,6 +985,13 @@ private Map<String, Object> filterTimeForPG(ResultSet resultSet, Map<String, Str
985985
} else {
986986
dataMap.put(colName, null);
987987
}
988+
} else if (dataType.equals("money")) {
989+
String money = resultSet.getString(colName);
990+
if ("null".equals(money)) {
991+
dataMap.put(colName, null);
992+
} else {
993+
dataMap.put(colName, new BigDecimal(money.substring(1).replace(",", "")));
994+
}
988995
} else {
989996
dataMap.put(colName, processData(resultSet.getObject(colName), dataType));
990997
}

0 commit comments

Comments
 (0)