diff --git a/src/sentry/search/eap/constants.py b/src/sentry/search/eap/constants.py index 99c8ef020ed1ac..f2f5cbd128fb5b 100644 --- a/src/sentry/search/eap/constants.py +++ b/src/sentry/search/eap/constants.py @@ -39,32 +39,32 @@ # TODO: we need a datetime type # Maps search types back to types for the proto TYPE_MAP: dict[SearchType, AttributeKey.Type.ValueType] = { - "bit": DOUBLE, - "byte": DOUBLE, - "kibibyte": DOUBLE, - "mebibyte": DOUBLE, - "gibibyte": DOUBLE, - "tebibyte": DOUBLE, - "pebibyte": DOUBLE, - "exbibyte": DOUBLE, - "kilobyte": DOUBLE, - "megabyte": DOUBLE, - "gigabyte": DOUBLE, - "terabyte": DOUBLE, - "petabyte": DOUBLE, - "exabyte": DOUBLE, - "nanosecond": DOUBLE, - "microsecond": DOUBLE, - "millisecond": DOUBLE, - "second": DOUBLE, - "minute": DOUBLE, - "hour": DOUBLE, - "day": DOUBLE, - "week": DOUBLE, - "duration": DOUBLE, + "bit": FLOAT, + "byte": FLOAT, + "kibibyte": FLOAT, + "mebibyte": FLOAT, + "gibibyte": FLOAT, + "tebibyte": FLOAT, + "pebibyte": FLOAT, + "exbibyte": FLOAT, + "kilobyte": FLOAT, + "megabyte": FLOAT, + "gigabyte": FLOAT, + "terabyte": FLOAT, + "petabyte": FLOAT, + "exabyte": FLOAT, + "nanosecond": FLOAT, + "microsecond": FLOAT, + "millisecond": FLOAT, + "second": FLOAT, + "minute": FLOAT, + "hour": FLOAT, + "day": FLOAT, + "week": FLOAT, + "duration": FLOAT, "integer": INT, - "number": DOUBLE, - "percentage": DOUBLE, + "number": FLOAT, + "percentage": FLOAT, "string": STRING, "boolean": BOOLEAN, } diff --git a/src/sentry/search/eap/spans.py b/src/sentry/search/eap/spans.py index be9dea8b78b5e9..b95efdd21d2610 100644 --- a/src/sentry/search/eap/spans.py +++ b/src/sentry/search/eap/spans.py @@ -333,7 +333,7 @@ def _resolve_search_value( ) elif isinstance(value, (float, int)): return AttributeValue(val_int=int(value)) - elif column_type == constants.DOUBLE: + elif column_type == constants.FLOAT: if operator in constants.IN_OPERATORS: if isinstance(value, list): return AttributeValue( diff --git a/src/sentry/snuba/spans_rpc.py b/src/sentry/snuba/spans_rpc.py index 08fde8d8335c14..0858d1d5283d10 100644 --- a/src/sentry/snuba/spans_rpc.py +++ b/src/sentry/snuba/spans_rpc.py @@ -15,6 +15,7 @@ from sentry.search.eap.constants import ( BOOLEAN, DOUBLE, + FLOAT, INT, MAX_ROLLUP_POINTS, STRING, @@ -140,7 +141,7 @@ def run_table_query( result_value = result.val_str elif resolved_column.proto_type == INT: result_value = result.val_int - elif resolved_column.proto_type == DOUBLE: + elif resolved_column.proto_type == DOUBLE or resolved_column.proto_type == FLOAT: if result.WhichOneof("value") == "val_float": result_value = result.val_float if result.WhichOneof("value") == "val_double":