Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit ad1cde5

Browse files
committed
More updates
1 parent 0a4091b commit ad1cde5

File tree

3 files changed

+81
-81
lines changed

3 files changed

+81
-81
lines changed

platform/testdata/aggregation_requests_2.go

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -607,7 +607,7 @@ var AggregationTests2 = []AggregationTestCase{
607607
quantiles(0.020000)("timestamp") AS "metric__2__1_col_1",
608608
sumOrNull("count") AS "metric__2__2_col_0"
609609
FROM __quesma_table_name
610-
WHERE ("timestamp">=fromUnixTimestamp64Milli(1713401475845) AND "timestamp"<=fromUnixTimestamp64Milli(1714697475845))
610+
WHERE ("timestamp">=__quesma_from_unixtime64mili(1713401475845) AND "timestamp"<=__quesma_from_unixtime64mili(1714697475845))
611611
GROUP BY "response" AS "aggr__2__key_0"
612612
ORDER BY "aggr__2__count" DESC, "aggr__2__key_0" ASC
613613
LIMIT 4`,
@@ -1677,7 +1677,7 @@ var AggregationTests2 = []AggregationTestCase{
16771677
floor("bytes2"/5)*5 AS "aggr__2__3__key_0",
16781678
count(*) AS "aggr__2__3__count"
16791679
FROM ` + TableName + `
1680-
WHERE ("timestamp">=fromUnixTimestamp64Milli(1715348876077) AND "timestamp"<=fromUnixTimestamp64Milli(1715349776077))
1680+
WHERE ("timestamp">=__quesma_from_unixtime64mili(1715348876077) AND "timestamp"<=__quesma_from_unixtime64mili(1715349776077))
16811681
GROUP BY floor("bytes"/100)*100 AS "aggr__2__key_0",
16821682
floor("bytes2"/5)*5 AS "aggr__2__3__key_0"))
16831683
ORDER BY "aggr__2__order_1_rank" ASC, "aggr__2__3__order_1_rank" ASC`,
@@ -1871,7 +1871,7 @@ var AggregationTests2 = []AggregationTestCase{
18711871
floor("bytes2"/5)*5 AS "aggr__2__3__key_0",
18721872
count(*) AS "aggr__2__3__count"
18731873
FROM ` + TableName + `
1874-
WHERE ("timestamp">=fromUnixTimestamp64Milli(1715348876077) AND "timestamp"<=fromUnixTimestamp64Milli(1715349776077))
1874+
WHERE ("timestamp">=__quesma_from_unixtime64mili(1715348876077) AND "timestamp"<=__quesma_from_unixtime64mili(1715349776077))
18751875
GROUP BY floor("bytes"/100)*100 AS "aggr__2__key_0",
18761876
floor("bytes2"/5)*5 AS "aggr__2__3__key_0"))
18771877
ORDER BY "aggr__2__order_1_rank" ASC, "aggr__2__3__order_1_rank" ASC`,
@@ -2473,8 +2473,8 @@ var AggregationTests2 = []AggregationTestCase{
24732473
quantiles(0.750000)("docker.cpu.total.pct") AS "metric__0__1__2_col_0"
24742474
FROM __quesma_table_name
24752475
WHERE ("data_stream.dataset"='docker.cpu' AND ("@timestamp">=
2476-
fromUnixTimestamp64Milli(1723967652291) AND "@timestamp"<=
2477-
fromUnixTimestamp64Milli(1725263652291)))
2476+
__quesma_from_unixtime64mili(1723967652291) AND "@timestamp"<=
2477+
__quesma_from_unixtime64mili(1725263652291)))
24782478
GROUP BY toInt64(toUnixTimestamp64Milli("@timestamp") / 43200000) AS
24792479
"aggr__0__key_0", "container.name" AS "aggr__0__1__key_0"))
24802480
WHERE "aggr__0__1__order_1_rank"<=6
@@ -3759,15 +3759,15 @@ var AggregationTests2 = []AggregationTestCase{
37593759
"aggr__histo__0__order_1_rank"
37603760
FROM (
37613761
SELECT toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3762-
fromUnixTimestamp(1706021760))) / 30) AS "aggr__histo__key_0",
3762+
__quesma_from_unixtime(1706021760))) / 30) AS "aggr__histo__key_0",
37633763
sum(count(*)) OVER (PARTITION BY "aggr__histo__key_0") AS
37643764
"aggr__histo__count",
37653765
sum(count(*)) OVER (PARTITION BY "aggr__histo__key_0") AS
37663766
"aggr__histo__0__parent_count", "type" AS "aggr__histo__0__key_0",
37673767
count(*) AS "aggr__histo__0__count"
37683768
FROM __quesma_table_name
37693769
GROUP BY toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3770-
fromUnixTimestamp(1706021760))) / 30) AS "aggr__histo__key_0",
3770+
__quesma_from_unixtime(1706021760))) / 30) AS "aggr__histo__key_0",
37713771
"type" AS "aggr__histo__0__key_0"))
37723772
WHERE "aggr__histo__0__order_1_rank"<=11
37733773
ORDER BY "aggr__histo__order_1_rank" ASC, "aggr__histo__0__order_1_rank" ASC`,
@@ -3909,40 +3909,40 @@ var AggregationTests2 = []AggregationTestCase{
39093909
},
39103910
ExpectedPancakeSQL: `
39113911
SELECT toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3912-
fromUnixTimestamp(1706878800))) / 90) AS "aggr__histo1__key_0",
3912+
__quesma_from_unixtime(1706878800))) / 90) AS "aggr__histo1__key_0",
39133913
count(*) AS "aggr__histo1__count"
39143914
FROM __quesma_table_name
39153915
GROUP BY toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3916-
fromUnixTimestamp(1706878800))) / 90) AS "aggr__histo1__key_0"
3916+
__quesma_from_unixtime(1706878800))) / 90) AS "aggr__histo1__key_0"
39173917
ORDER BY "aggr__histo1__key_0" ASC`,
39183918
ExpectedAdditionalPancakeSQLs: []string{
39193919
`SELECT toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3920-
fromUnixTimestamp(1706878800))) / 90) AS "aggr__histo2__key_0",
3920+
__quesma_from_unixtime(1706878800))) / 90) AS "aggr__histo2__key_0",
39213921
count(*) AS "aggr__histo2__count"
39223922
FROM __quesma_table_name
39233923
GROUP BY toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3924-
fromUnixTimestamp(1706878800))) / 90) AS "aggr__histo2__key_0"
3924+
__quesma_from_unixtime(1706878800))) / 90) AS "aggr__histo2__key_0"
39253925
ORDER BY "aggr__histo2__key_0" ASC`,
39263926
`SELECT toInt64(toUnixTimestamp64Milli(COALESCE("customer_birth_date_datetime64",
3927-
fromUnixTimestamp64Milli(1706878800000))) / 90000) AS "aggr__histo3__key_0",
3927+
__quesma_from_unixtime64mili(1706878800000))) / 90000) AS "aggr__histo3__key_0",
39283928
count(*) AS "aggr__histo3__count"
39293929
FROM __quesma_table_name
39303930
GROUP BY toInt64(toUnixTimestamp64Milli(COALESCE("customer_birth_date_datetime64",
3931-
fromUnixTimestamp64Milli(1706878800000))) / 90000) AS "aggr__histo3__key_0"
3931+
__quesma_from_unixtime64mili(1706878800000))) / 90000) AS "aggr__histo3__key_0"
39323932
ORDER BY "aggr__histo3__key_0" ASC`,
39333933
`SELECT toInt64(toUnixTimestamp64Milli(COALESCE("customer_birth_date_datetime64",
3934-
fromUnixTimestamp64Milli(1706853600000))) / 90000) AS "aggr__histo4__key_0",
3934+
__quesma_from_unixtime64mili(1706853600000))) / 90000) AS "aggr__histo4__key_0",
39353935
count(*) AS "aggr__histo4__count"
39363936
FROM __quesma_table_name
39373937
GROUP BY toInt64(toUnixTimestamp64Milli(COALESCE("customer_birth_date_datetime64",
3938-
fromUnixTimestamp64Milli(1706853600000))) / 90000) AS "aggr__histo4__key_0"
3938+
__quesma_from_unixtime64mili(1706853600000))) / 90000) AS "aggr__histo4__key_0"
39393939
ORDER BY "aggr__histo4__key_0" ASC`,
39403940
`SELECT toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3941-
fromUnixTimestamp(1706853600))) / 90) AS "aggr__histo5__key_0",
3941+
__quesma_from_unixtime(1706853600))) / 90) AS "aggr__histo5__key_0",
39423942
count(*) AS "aggr__histo5__count"
39433943
FROM __quesma_table_name
39443944
GROUP BY toInt64(toUnixTimestamp(COALESCE("customer_birth_date",
3945-
fromUnixTimestamp(1706853600))) / 90) AS "aggr__histo5__key_0"
3945+
__quesma_from_unixtime(1706853600))) / 90) AS "aggr__histo5__key_0"
39463946
ORDER BY "aggr__histo5__key_0" ASC`,
39473947
},
39483948
},

platform/testdata/dates.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -317,8 +317,8 @@ var AggregationTestsWithDates = []AggregationTestCase{
317317
"@timestamp", 'Europe/Warsaw'))*1000) / 10000) AS "aggr__timeseries__key_0",
318318
count(*) AS "aggr__timeseries__count"
319319
FROM __quesma_table_name
320-
WHERE ("@timestamp">=fromUnixTimestamp64Milli(1730370296174) AND "@timestamp"<=
321-
fromUnixTimestamp64Milli(1730370596174))
320+
WHERE ("@timestamp">=__quesma_from_unixtime64mili(1730370296174) AND "@timestamp"<=
321+
__quesma_from_unixtime64mili(1730370596174))
322322
GROUP BY toInt64((toUnixTimestamp64Milli("@timestamp")+timeZoneOffset(toTimezone
323323
("@timestamp", 'Europe/Warsaw'))*1000) / 10000) AS "aggr__timeseries__key_0"
324324
ORDER BY "aggr__timeseries__key_0" ASC`,
@@ -498,8 +498,8 @@ var AggregationTestsWithDates = []AggregationTestCase{
498498
"@timestamp", 'Europe/Warsaw'))*1000) / 10000) AS "aggr__timeseries__key_0",
499499
count(*) AS "aggr__timeseries__count"
500500
FROM __quesma_table_name
501-
WHERE ("@timestamp">=fromUnixTimestamp64Milli(1730370296174) AND "@timestamp"<=
502-
fromUnixTimestamp64Milli(1730370596174))
501+
WHERE ("@timestamp">=__quesma_from_unixtime64mili(1730370296174) AND "@timestamp"<=
502+
__quesma_from_unixtime64mili(1730370596174))
503503
GROUP BY toInt64((toUnixTimestamp64Milli("@timestamp")+timeZoneOffset(toTimezone
504504
("@timestamp", 'Europe/Warsaw'))*1000) / 10000) AS "aggr__timeseries__key_0"
505505
ORDER BY "aggr__timeseries__key_0" ASC`,
@@ -628,8 +628,8 @@ var AggregationTestsWithDates = []AggregationTestCase{
628628
count(*) AS "aggr__0__count",
629629
sumOrNull("body_bytes_sent") AS "metric__0__1_col_0"
630630
FROM __quesma_table_name
631-
WHERE ("@timestamp">=fromUnixTimestamp64Milli(1259327903466) AND "@timestamp"<=
632-
fromUnixTimestamp64Milli(1732713503466))
631+
WHERE ("@timestamp">=__quesma_from_unixtime64mili(1259327903466) AND "@timestamp"<=
632+
__quesma_from_unixtime64mili(1732713503466))
633633
GROUP BY toInt64((toUnixTimestamp64Milli("@timestamp")+timeZoneOffset(toTimezone
634634
("@timestamp", 'Europe/Warsaw'))*1000) / 86400000) AS "aggr__0__key_0"
635635
ORDER BY "aggr__0__key_0" ASC`,

0 commit comments

Comments
 (0)