Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix aggregation definition error logs #1538

Merged
merged 1 commit into from
Oct 5, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ public static AggregationRuntime parse(AggregationDefinition aggregationDefiniti

if (aggregationDefinition == null) {
throw new SiddhiAppCreationException(
"AggregationDefinition instance is null. " +
"Aggregation Definition instance is null. " +
"Hence, can't create the siddhi app '" + siddhiAppContext.getName() + "'");
}
if (aggregationDefinition.getTimePeriod() == null) {
throw new SiddhiAppCreationException(
"AggregationDefinition '" + aggregationDefinition.getId() + "'s timePeriod is null. " +
"Aggregation Definition '" + aggregationDefinition.getId() + "'s timePeriod is null. " +
"Hence, can't create the siddhi app '" + siddhiAppContext.getName() + "'",
aggregationDefinition.getQueryContextStartIndex(), aggregationDefinition.getQueryContextEndIndex());
}
if (aggregationDefinition.getSelector() == null) {
throw new SiddhiAppCreationException(
"AggregationDefinition '" + aggregationDefinition.getId() + "'s selection is not defined. " +
"Aggregation Definition '" + aggregationDefinition.getId() + "'s selection is not defined. " +
"Hence, can't create the siddhi app '" + siddhiAppContext.getName() + "'",
aggregationDefinition.getQueryContextStartIndex(), aggregationDefinition.getQueryContextEndIndex());
}
Expand Down Expand Up @@ -585,10 +585,9 @@ private static void populateIncomingAggregatorsAndExecutors(
siddhiQueryContext);
} else if (externalTimestampExecutor.getReturnType() != Attribute.Type.LONG) {
throw new SiddhiAppCreationException(
"AggregationDefinition '" + aggregationDefinition.getId() + "'s aggregateAttribute expects " +
"long or string, but found " + timestampExecutor.getReturnType() + ". " +
"Hence, can't create the siddhi app '" +
siddhiQueryContext.getSiddhiAppContext().getName() + "'",
"Aggregation Definition '" + aggregationDefinition.getId() + "'s timestamp attribute expects " +
"long or string, but found " + externalTimestampExecutor.getReturnType() + ". Hence, can't " +
"create the siddhi app '" + siddhiQueryContext.getSiddhiAppContext().getName() + "'",
externalTimestampExpression.getQueryContextStartIndex(),
externalTimestampExpression.getQueryContextEndIndex());
}
Expand Down