Skip to content

Commit

Permalink
OPIK-446 query builder temporary fix
Browse files Browse the repository at this point in the history
  • Loading branch information
idoberko2 committed Dec 18, 2024
1 parent a9c127c commit 0713eff
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ public class FilterQueryBuilder {
private static final String USAGE_PROMPT_TOKENS_ANALYTICS_DB = "usage['prompt_tokens']";
private static final String USAGE_TOTAL_TOKENS_ANALYTICS_DB = "usage['total_tokens']";
private static final String VALUE_ANALYTICS_DB = "value";
private static final String DURATION_ANALYTICS_DB = "duration_millis";
private static final String DURATION_ANALYTICS_DB = """
if(end_time IS NOT NULL AND start_time IS NOT NULL
AND notEquals(start_time, toDateTime64('1970-01-01 00:00:00.000', 9)),
(dateDiff('microsecond', start_time, end_time) / 1000.0),
NULL)
""";

private static final Map<Operator, Map<FieldType, String>> ANALYTICS_DB_OPERATOR_MAP = new EnumMap<>(Map.of(
Operator.CONTAINS, new EnumMap<>(Map.of(
Expand Down

0 comments on commit 0713eff

Please sign in to comment.