Skip to content

Commit cae01ce

Browse files
Improve feedback validation query (tensorzero#2958)
1 parent 48851f1 commit cae01ce

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tensorzero-core/src/endpoints/feedback.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,11 @@ async fn get_function_name(
476476
MetricConfigLevel::Episode => "episode_id_uint",
477477
};
478478
let query = format!(
479-
"SELECT function_name FROM {table_name} FINAL WHERE {identifier_key} = toUInt128(toUUID('{target_id}'))"
479+
"SELECT function_name
480+
FROM {table_name}
481+
WHERE {identifier_key} = toUInt128(toUUID('{target_id}'))
482+
LIMIT 1
483+
SETTINGS max_threads=1"
480484
);
481485
let function_name = connection_info
482486
.run_query_synchronous_no_params(query)

0 commit comments

Comments
 (0)