Skip to content

Commit

Permalink
Merge branch 'main' into feature/update-elasticsearch-version
Browse files Browse the repository at this point in the history
  • Loading branch information
kuma0128 authored Oct 17, 2024
2 parents b80f48f + b175f6c commit 0a53cd0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ private DataInsightTotalAssetTemplate createTotalAssetTemplate(
dateWithCount.forEach((key, value) -> dateMap.put(key, value.intValue()));
processDateMapToNormalize(dateMap);

int changeInTotalAssets = (int) (currentCount - previousCount);
int changeInTotalAssets = (int) Math.abs(currentCount - previousCount);

if (previousCount == 0D) {
// it should be undefined
Expand Down Expand Up @@ -276,7 +276,7 @@ private DataInsightDescriptionAndOwnerTemplate createDescriptionTemplate(
currentPercentCompleted = (currentCompletedDescription / currentTotalAssetCount) * 100;
}

int changeCount = (int) (currentCompletedDescription - previousCompletedDescription);
int changeCount = (int) Math.abs(currentCompletedDescription - previousCompletedDescription);

return getTemplate(
DataInsightDescriptionAndOwnerTemplate.MetricType.DESCRIPTION,
Expand Down Expand Up @@ -327,7 +327,7 @@ private DataInsightDescriptionAndOwnerTemplate createOwnershipTemplate(
currentPercentCompleted = (currentHasOwner / currentTotalAssetCount) * 100;
}

int changeCount = (int) (currentHasOwner - previousHasOwner);
int changeCount = (int) Math.abs(currentHasOwner - previousHasOwner);

return getTemplate(
DataInsightDescriptionAndOwnerTemplate.MetricType.OWNER,
Expand Down Expand Up @@ -376,7 +376,7 @@ private DataInsightDescriptionAndOwnerTemplate createTierTemplate(
currentPercentCompleted = (currentHasTier / currentTotalAssetCount) * 100;
}

int changeCount = (int) (currentHasTier - previousHasTier);
int changeCount = (int) Math.abs(currentHasTier - previousHasTier);

// TODO: Understand if we actually use this tierData for anything.
Map<String, Double> tierData = new HashMap<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public class EntityBuilderConstant {
public static final String FIELD_DISPLAY_NAME_NGRAM = "displayName.ngram";
public static final String PRE_TAG = "<span class=\"text-highlighter\">";
public static final String POST_TAG = "</span>";
public static final Integer MAX_AGGREGATE_SIZE = 50;
public static final Integer MAX_AGGREGATE_SIZE = 10000;
public static final Integer MAX_RESULT_HITS = 10000;
public static final String QUERY = "query";
public static final String QUERY_NGRAM = "query.ngram";
Expand Down

0 comments on commit 0a53cd0

Please sign in to comment.