@mastra/clickhouse 1.24.0 → 1.25.0-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
@@ -337,6 +337,7 @@ function resolveClickhouseConfig(config) {
337
337
  username: config.username,
338
338
  password: config.password,
339
339
  clickhouse_settings: {
340
+ ...config.clickhouse_settings,
340
341
  date_time_input_format: "best_effort",
341
342
  date_time_output_format: "iso",
342
343
  use_client_time_zone: 1,
@@ -7083,18 +7084,14 @@ function compileClickHouseTraceScope(selection, relationCollections, parameters,
7083
7084
  const to = parameters.add(selection.timeRange.to, "DateTime64(3, 'UTC')");
7084
7085
  const tenant = compileTenantScope(scope, parameters);
7085
7086
  const ctes = [`current_roots AS (
7086
- SELECT * FROM (
7087
- SELECT *
7088
- FROM ${TABLE_TRACE_ROOTS}
7089
- WHERE traceId IN (
7090
- SELECT traceId
7091
- FROM ${TABLE_TRACE_ROOTS} r
7092
- WHERE startedAt >= ${from}
7093
- AND startedAt < ${to}${tenant}${seedConjuncts.map((conjunct) => `\n AND (${compilePredicate(conjunct, parameters)})`).join("")}
7094
- )
7095
- ORDER BY dedupeKey
7096
- LIMIT 1 BY dedupeKey
7097
- )
7087
+ SELECT *
7088
+ FROM ${TABLE_TRACE_ROOTS}
7089
+ WHERE traceId IN (
7090
+ SELECT traceId
7091
+ FROM ${TABLE_TRACE_ROOTS} r
7092
+ WHERE startedAt >= ${from}
7093
+ AND startedAt < ${to}${tenant}${seedConjuncts.map((conjunct) => `\n AND (${compilePredicate(conjunct, parameters)})`).join("")}
7094
+ )${tenant}
7098
7095
  ORDER BY traceId, dedupeKey
7099
7096
  LIMIT 1 BY traceId
7100
7097
  )`, `root_scope AS (