Skip to content

Commit

Permalink
perf(weave): use LIKE string compare in pre-group by conditioning (#3791
Browse files Browse the repository at this point in the history
)
  • Loading branch information
gtarpenning authored Feb 27, 2025
1 parent 401ff55 commit ca07fc6
Show file tree
Hide file tree
Showing 3 changed files with 463 additions and 21 deletions.
14 changes: 13 additions & 1 deletion tests/trace/test_client_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -3373,7 +3373,7 @@ def test_call_stream_query_heavy_query_batch(client):
parent_id=parent_id,
started_at=datetime.datetime.now(tz=datetime.timezone.utc)
- datetime.timedelta(seconds=1),
attributes={"a": 5},
attributes={"a": 5, "empty": "", "null": None},
inputs={"param": {"value1": "hello"}},
)
client.server.call_start(tsi.CallStartReq(start=start))
Expand Down Expand Up @@ -3454,3 +3454,15 @@ def test_call_stream_query_heavy_query_batch(client):
for call in res:
assert call.inputs["param"]["value1"] == "helslo"
assert call.output["d"] == 5

# now try to filter by the empty attribute string
query = {
"project_id": project_id,
"query": {
"$expr": {"$eq": [{"$getField": "attributes.empty"}, {"$literal": ""}]}
},
}
res = client.server.calls_query_stream(tsi.CallsQueryReq.model_validate(query))
assert len(list(res)) == 10
for call in res:
assert call.attributes["empty"] == ""
Loading

0 comments on commit ca07fc6

Please sign in to comment.