Skip to content

Commit 8d31ef4

Browse files
committed
test(clickhouse): expect stored attributes before staged migration
1 parent 6050b80 commit 8d31ef4

1 file changed

Lines changed: 10 additions & 5 deletions

File tree

internal-packages/clickhouse/src/taskEvents.test.ts

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ describe("task events v2", () => {
1313
const ch = new ClickHouse({ url: clickhouseContainer.getConnectionUrl(), name: "test" });
1414
const startTime = new Date("2026-09-01T10:00:00.000Z");
1515
const expiresAt = new Date(Date.now() + 90 * 24 * 60 * 60 * 1000);
16-
const spanId = "span_ephemeral_attributes";
16+
const spanId = "span_materialized_attributes";
1717

1818
const [insertError] = await ch.taskEventsV2.insert([
1919
{
@@ -42,7 +42,7 @@ describe("task events v2", () => {
4242
expect(insertError).toBeNull();
4343

4444
const readAttributes = ch.reader.query({
45-
name: "read-ephemeral-task-event-attributes",
45+
name: "read-task-event-attributes",
4646
query: `SELECT attributes_text,
4747
toUInt8(inserted_at > toDateTime64('2020-01-01 00:00:00', 3)) AS has_inserted_at
4848
FROM trigger_dev.task_events_v2
@@ -82,8 +82,8 @@ describe("task events v2", () => {
8282
expect(columns).toEqual([
8383
{
8484
name: "attributes",
85-
default_kind: "EPHEMERAL",
86-
default_expression: "defaultValueOfTypeName('JSON')",
85+
default_kind: "",
86+
default_expression: "",
8787
},
8888
{
8989
name: "attributes_text",
@@ -98,7 +98,12 @@ describe("task events v2", () => {
9898
FROM system.data_skipping_indices
9999
WHERE database = 'trigger_dev'
100100
AND table = 'task_events_v2'
101-
AND name IN ('idx_attributes_text_search', 'idx_message_text_search')
101+
AND name IN (
102+
'idx_attributes_text_search',
103+
'idx_attributes_text',
104+
'idx_message_text_search',
105+
'message_text_search'
106+
)
102107
ORDER BY name`,
103108
schema: z.object({ name: z.string() }),
104109
});

0 commit comments

Comments
 (0)