From c3caeec8db318691f297076a502a7c2c6aa6fd9d Mon Sep 17 00:00:00 2001 From: ghy Date: Thu, 19 Dec 2024 17:03:31 +0800 Subject: [PATCH] fix: api request 400 error sources/sync/schemas/:id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 【修复】数据源为starrocks时,同步数据库模式 报错 400。 错误信息:2024-12-19 16:45:40.900 ERROR datart.server.config.WebExceptionHandler : null java.lang.NullPointerException: null --- .../src/main/java/datart/data/provider/jdbc/DataTypeUtils.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/data-providers/data-provider-base/src/main/java/datart/data/provider/jdbc/DataTypeUtils.java b/data-providers/data-provider-base/src/main/java/datart/data/provider/jdbc/DataTypeUtils.java index 60d5aec70..1953b74aa 100644 --- a/data-providers/data-provider-base/src/main/java/datart/data/provider/jdbc/DataTypeUtils.java +++ b/data-providers/data-provider-base/src/main/java/datart/data/provider/jdbc/DataTypeUtils.java @@ -58,6 +58,9 @@ public static ValueType jdbcType2DataType(int jdbcType) { } else { family = sqlTypeName.getFamily(); } + if(family == null) { + return ValueType.STRING; + } switch (family) { case NUMERIC: return ValueType.NUMERIC;