Transformers: fix binary operation (#24604)

* check the display name

* remove unchanged line

Co-authored-by: Dominik Prokop <dominik.prokop@grafana.com>
This commit is contained in:
Ryan McKinley 2020-05-13 04:12:08 -07:00 committed by GitHub
parent f23ecc40b4
commit 97e2837d7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,6 +10,7 @@ import { seriesToColumnsTransformer } from './seriesToColumns';
import { getTimeField } from '../../dataframe/processDataFrame';
import defaults from 'lodash/defaults';
import { BinaryOperationID, binaryOperators } from '../../utils/binaryOperators';
import { getFieldDisplayName } from '../../field';
export enum CalculateFieldMode {
ReduceRow = 'reduceRow',
@ -182,7 +183,7 @@ function findFieldValuesWithNameOrConstant(frame: DataFrame, name: string): Vect
}
for (const f of frame.fields) {
if (f.name === name) {
if (name === getFieldDisplayName(f, frame)) {
return f.values;
}
}