mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
[fix][headless]Fix NPE issue.
This commit is contained in:
@@ -36,6 +36,9 @@ public class DuckdbAdaptor extends DefaultDbAdaptor {
|
||||
|
||||
@Override
|
||||
public String rewriteSql(String sql) {
|
||||
if (sql == null) {
|
||||
return null;
|
||||
}
|
||||
return sql.replaceAll("`", "");
|
||||
}
|
||||
|
||||
|
||||
@@ -19,7 +19,6 @@ import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.tencent.supersonic.common.pojo.Constants.JOIN_UNDERLINE;
|
||||
import static com.tencent.supersonic.common.pojo.Constants.UNIONALL;
|
||||
|
||||
@Slf4j
|
||||
@@ -73,10 +72,6 @@ public class QueryUtils {
|
||||
Map<String, String> nameTypePair, Map<String, MetricResp> metricRespMap,
|
||||
Map<String, DimensionResp> dimensionRespMap) {
|
||||
String nameEn = getName(column.getBizName());
|
||||
if (nameEn.contains(JOIN_UNDERLINE)) {
|
||||
nameEn = nameEn.split(JOIN_UNDERLINE)[1];
|
||||
}
|
||||
// set name
|
||||
if (namePair.containsKey(nameEn)) {
|
||||
column.setName(namePair.get(nameEn));
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user