Skip to content

Commit

Permalink
Merge pull request #507 from metrico/fix/empty_cached_ids_bug
Browse files Browse the repository at this point in the history
debug
  • Loading branch information
akvlad authored May 31, 2024
2 parents f96a7e6 + aa1f3bf commit 78d5eb1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion traceql/clickhouse_transpiler/attr_condition.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ module.exports = class Builder {
const having = self.getCond(self.conds)
self.aggregator(sel)
sel.conditions = Sql.And(sel.conditions, Sql.Or(...self.where))
if (Array.isArray(ctx.randomFilter) && Array.isArray(ctx.cachedTraceIds)) {
if (Array.isArray(ctx.randomFilter) && Array.isArray(ctx.cachedTraceIds) && ctx.cachedTraceIds.length > 0) {
sel.conditions = Sql.And(
sel.conditions,
Sql.Or(
Expand Down

0 comments on commit 78d5eb1

Please sign in to comment.