File tree 1 file changed +2
-1
lines changed
x-pack/plugin/transform/src/test/java/org/elasticsearch/xpack/transform/transforms/pivot
1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change @@ -215,7 +215,8 @@ private AggregationConfig getAggregationConfig(String agg) throws IOException {
215
215
"{\" pivot_scripted_metric\" : {\n "
216
216
+ "\" scripted_metric\" : {\n "
217
217
+ " \" init_script\" : \" state.transactions = []\" ,\n "
218
- + " \" map_script\" : \" state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)\" , \n "
218
+ + " \" map_script\" : "
219
+ + " \" state.transactions.add(doc.type.value == 'sale' ? doc.amount.value : -1 * doc.amount.value)\" , \n "
219
220
+ " \" combine_script\" : \" double profit = 0; for (t in state.transactions) { profit += t } return profit\" ,\n "
220
221
+ " \" reduce_script\" : \" double profit = 0; for (a in states) { profit += a } return profit\" \n "
221
222
+ " }\n "
You can’t perform that action at this time.
0 commit comments