@mastra/clickhouse 1.21.1 → 1.21.2-alpha.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -6883,6 +6883,12 @@ function compileClickHouseTraceScope(selection, relationCollections, parameters,
6883
6883
  SELECT * FROM (
6884
6884
  SELECT *
6885
6885
  FROM ${TABLE_TRACE_ROOTS}
6886
+ WHERE traceId IN (
6887
+ SELECT traceId
6888
+ FROM ${TABLE_TRACE_ROOTS}
6889
+ WHERE startedAt >= ${from}
6890
+ AND startedAt < ${to}${tenant}
6891
+ )
6886
6892
  ORDER BY dedupeKey
6887
6893
  LIMIT 1 BY dedupeKey
6888
6894
  )