mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-10 11:07:06 +00:00
(improvement)(chat) Avoid occasional npe when obtaining recommended dimensions (#1693)
Co-authored-by: lxwcodemonkey
This commit is contained in:
@@ -2,7 +2,6 @@ package com.tencent.supersonic.auth.authentication.interceptor;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.tencent.supersonic.auth.api.authentication.annotation.AuthenticationIgnore;
|
||||
import com.tencent.supersonic.auth.api.authentication.config.AuthenticationConfig;
|
||||
import com.tencent.supersonic.auth.api.authentication.pojo.User;
|
||||
|
||||
@@ -46,6 +46,9 @@ public class DimensionRecommendProcessor implements ExecuteResultProcessor {
|
||||
private List<SchemaElement> getDimensions(Long metricId, Long dataSetId) {
|
||||
SemanticLayerService semanticService = ContextUtils.getBean(SemanticLayerService.class);
|
||||
DataSetSchema dataSetSchema = semanticService.getDataSetSchema(dataSetId);
|
||||
if (dataSetSchema == null) {
|
||||
return Lists.newArrayList();
|
||||
}
|
||||
List<Long> drillDownDimensions = Lists.newArrayList();
|
||||
Set<SchemaElement> metricElements = dataSetSchema.getMetrics();
|
||||
if (!CollectionUtils.isEmpty(metricElements)) {
|
||||
|
||||
Reference in New Issue
Block a user