mirror of
https://github.com/elastic/kibana.git
synced 2025-04-23 09:19:04 -04:00
[ES|QL] Fixes some problems with numeric control values (#213204)
## Summary ES|QL doesnt have sometimes the ability to compare a numeric field with a string when this string is a numeric value. For example: ``` FROM kibana_sample_data_logs | WHERE bytes > "6193" ``` This is going to fail, the value should be numeric to work as expected. For this reason controls that have numeric values do not work correctly. This PR is fixing this
This commit is contained in:
parent
04ee5fc4f3
commit
bf84c2aadd
1 changed files with 3 additions and 1 deletions
|
@ -36,7 +36,9 @@ export function initializeESQLControlSelections(initialState: ESQLControlState)
|
|||
// derive ESQL control variable from state.
|
||||
const getEsqlVariable = () => ({
|
||||
key: variableName$.value,
|
||||
value: selectedOptions$.value[0],
|
||||
value: isNaN(Number(selectedOptions$.value[0]))
|
||||
? selectedOptions$.value[0]
|
||||
: Number(selectedOptions$.value[0]),
|
||||
type: variableType$.value,
|
||||
});
|
||||
const esqlVariable$ = new BehaviorSubject<ESQLControlVariable>(getEsqlVariable());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue