Skip to content

Commit be447b5

Browse files
committed
fix: postgres money bug
(cherry picked from commit dae5e3c)
1 parent 1f58e26 commit be447b5

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
@@ -966,6 +966,13 @@ private Map<String, Object> filterTimeForPG(ResultSet resultSet, Map<String, Str
966966
} else {
967967
dataMap.put(colName, null);
968968
}
969+
} else if (dataType.equals("money")) {
970+
String money = resultSet.getString(colName);
971+
if ("null".equals(money)) {
972+
dataMap.put(colName, null);
973+
} else {
974+
dataMap.put(colName, new BigDecimal(money.substring(1).replace(",", "")));
975+
}
969976
} else {
970977
dataMap.put(colName, processData(resultSet.getObject(colName), dataType));
971978
}

0 commit comments

Comments
 (0)