Skip to content

Commit 0e23e50

Browse files
committed
Merge branch '1.5_3.6.0_bigunsigned' into '1.5_v3.6.0'
bigint unsigned转long See merge request !44
2 parents b68b197 + b7fec8c commit 0e23e50

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/util/MathUtil.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,8 @@ public static Long getLongVal(Object obj) {
4848
return Long.valueOf(obj.toString());
4949
} else if (obj instanceof BigDecimal) {
5050
return ((BigDecimal) obj).longValue();
51+
} else if (obj instanceof BigInteger) {
52+
return ((BigInteger) obj).longValue();
5153
}
5254

5355
throw new RuntimeException("not support type of " + obj.getClass() + " convert to Long.");

rdb/rdb-side/src/main/java/com/dtstack/flink/sql/side/rdb/util/SwitchUtil.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public static Object getTarget(Object obj, String targetType) {
4242
return MathUtil.getIntegerVal(obj);
4343

4444
case "bigint":
45+
case "bigintunsigned":
4546
case "intunsigned":
4647
case "integerunsigned":
4748
return MathUtil.getLongVal(obj);

0 commit comments

Comments
 (0)