Skip to content

Commit

Permalink
added type check for pipeline aggregator types in Transform initializ…
Browse files Browse the repository at this point in the history
…ation (opensearch-project#1014)

Signed-off-by: n-dohrmann <[email protected]>
Co-authored-by: Joanne Wang <[email protected]>
  • Loading branch information
2 people authored and Joshua152 committed Dec 22, 2023
1 parent e9772f7 commit 72af905
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ data class Transform(
aggregations.aggregatorFactories.forEach {
require(supportedAggregations.contains(it.type)) { "Unsupported aggregation [${it.type}]" }
}
aggregations.pipelineAggregatorFactories.forEach {
require(supportedAggregations.contains(it.type)) { "Unsupported aggregation [${it.type}]" }
}
when (jobSchedule) {
is CronSchedule -> {
// Job scheduler already correctly throws errors for this
Expand Down

0 comments on commit 72af905

Please sign in to comment.