From 04588c429b77111b20d881746b897ae755fc3170 Mon Sep 17 00:00:00 2001 From: Rachel Chen Date: Mon, 18 Nov 2024 13:58:39 -0800 Subject: [PATCH] c --- snuba/web/rpc/common/common.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/snuba/web/rpc/common/common.py b/snuba/web/rpc/common/common.py index aecbc77033..7ebbe4b845 100644 --- a/snuba/web/rpc/common/common.py +++ b/snuba/web/rpc/common/common.py @@ -232,8 +232,15 @@ def attribute_key_to_expression(attr_key: AttributeKey) -> Expression: # End of special handling, just send to the appropriate bucket if attr_key.type == AttributeKey.Type.TYPE_STRING: - return SubscriptableReference( - alias=alias, column=column("attr_str"), key=literal(attr_key.name) + # return SubscriptableReference( + # alias=alias, column=column("attr_str"), key=literal(attr_key.name) + # ) + return f.CAST( + SubscriptableReference( + alias=None, column=column("attr_str"), key=literal(attr_key.name) + ), + "String", + alias=alias, ) if attr_key.type == AttributeKey.Type.TYPE_FLOAT: return SubscriptableReference(