Skip to content

Commit

Permalink
Fix Painless script used by TSVB
Browse files Browse the repository at this point in the history
It's at the moment unclear if this is a Painless regression (looks like),
but this seems to fix it based on testing.

I'm doing this change in the 6.5 branch, for a couple of reasons: I tested
it in 6.5 only, because master didn't seem to exhibit this issue. And it is
not the right fix, if Painless has a true regression.

Closes elastic/beats#8957.
  • Loading branch information
tsg committed Nov 7, 2018
1 parent 276cde4 commit 178472c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ describe('bucketTransform', () => {
},
gap_policy: 'skip',
script: {
source: 'params.value > 0 ? params.value : 0',
source: 'if (params.value > 0) {return params.value} else return 0',
lang: 'painless'
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ export default {
value: getBucketsPath(bucket.field, metrics),
},
script: {
source: 'params.value > 0 ? params.value : 0',
source: 'if (params.value > 0) {return params.value} else return 0',
lang: 'painless',
},
gap_policy: 'skip', // seems sane
Expand Down

0 comments on commit 178472c

Please sign in to comment.