From e12b53e51a27c462a0240e6b204691e0a2603048 Mon Sep 17 00:00:00 2001 From: shirly121 Date: Thu, 23 Nov 2023 14:30:19 +0800 Subject: [PATCH] [GIE Compiler] fix bugs of int parser --- .../main/java/com/alibaba/graphscope/common/config/Config.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/common/config/Config.java b/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/common/config/Config.java index 82b4bb7e339a..63cdd36f4d84 100644 --- a/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/common/config/Config.java +++ b/interactive_engine/compiler/src/main/java/com/alibaba/graphscope/common/config/Config.java @@ -16,6 +16,7 @@ package com.alibaba.graphscope.common.config; +import java.math.BigDecimal; import java.util.function.Function; public class Config { @@ -46,7 +47,7 @@ public static Config shortConfig(String key, short defaultVal) { } public static Config intConfig(String key, int defaultVal) { - return new Config<>(key, String.valueOf(defaultVal), (s) -> Integer.parseInt(s)); + return new Config<>(key, String.valueOf(defaultVal), (s) -> new BigDecimal(s).intValue()); } public static Config longConfig(String key, long defaultVal) {