You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 7, 2025. It is now read-only.
WHERE ("message" iLIKE '%user%' AND ("@timestamp">=__quesma_from_unix_timestamp_ms(1706020999481) AND "@timestamp"<=__quesma_from_unix_timestamp_ms(1706021899481)))
560
+
WHERE ("message" iLIKE '%user%' AND ("@timestamp">=fromUnixTimestamp64Milli(1706020999481) AND "@timestamp"<=fromUnixTimestamp64Milli(1706021899481)))
561
561
ORDER BY "@timestamp" DESC
562
562
LIMIT 500`,
563
563
},
@@ -694,15 +694,15 @@ var TestsAsyncSearch = []AsyncSearchTestCase{
`SELECT sum(count(*)) OVER () AS "metric____quesma_total_count_col_0",
697
-
toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS "aggr__0__key_0",
697
+
toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS "aggr__0__key_0",
698
698
count(*) AS "aggr__0__count"
699
699
FROM __quesma_table_name
700
-
WHERE ("message" iLIKE '%user%' AND ("@timestamp">=__quesma_from_unix_timestamp_ms(1706020999481) AND "@timestamp"<=__quesma_from_unix_timestamp_ms(1706021899481)))
701
-
GROUP BY toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS "aggr__0__key_0"
700
+
WHERE ("message" iLIKE '%user%' AND ("@timestamp">=fromUnixTimestamp64Milli(1706020999481) AND "@timestamp"<=fromUnixTimestamp64Milli(1706021899481)))
701
+
GROUP BY toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS "aggr__0__key_0"
702
702
ORDER BY "aggr__0__key_0" ASC`,
703
703
`SELECT "@timestamp"
704
704
FROM __quesma_table_name
705
-
WHERE ("message" iLIKE '%user%' AND ("@timestamp">=__quesma_from_unix_timestamp_ms(1706020999481) AND "@timestamp"<=__quesma_from_unix_timestamp_ms(1706021899481)))
705
+
WHERE ("message" iLIKE '%user%' AND ("@timestamp">=fromUnixTimestamp64Milli(1706020999481) AND "@timestamp"<=fromUnixTimestamp64Milli(1706021899481)))
706
706
LIMIT 100`,
707
707
},
708
708
true,
@@ -758,12 +758,12 @@ var TestsAsyncSearch = []AsyncSearchTestCase{
758
758
COALESCE("event_dataset", 'unknown') AS "aggr__stats__key_0",
759
759
sum(count(*)) OVER (PARTITION BY "aggr__stats__key_0") AS
760
760
"aggr__stats__count",
761
-
toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 1m0s) AS
761
+
toInt64(toUnixTimestamp64Milli("@timestamp") / 60000) AS
762
762
"aggr__stats__series__key_0", count(*) AS "aggr__stats__series__count"
763
763
FROM __quesma_table_name
764
-
WHERE ("@timestamp">__quesma_from_unix_timestamp_ms(1706194439033) AND "@timestamp"<=__quesma_from_unix_timestamp_ms(1706195339033))
764
+
WHERE ("@timestamp">fromUnixTimestamp64Milli(1706194439033) AND "@timestamp"<=fromUnixTimestamp64Milli(1706195339033))
765
765
GROUP BY COALESCE("event_dataset", 'unknown') AS "aggr__stats__key_0",
766
-
toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 1m0s) AS
766
+
toInt64(toUnixTimestamp64Milli("@timestamp") / 60000) AS
767
767
"aggr__stats__series__key_0"))
768
768
WHERE "aggr__stats__order_1_rank"<=4
769
769
ORDER BY "aggr__stats__order_1_rank" ASC,
@@ -941,10 +941,10 @@ var TestsAsyncSearch = []AsyncSearchTestCase{
941
941
[]string{`
942
942
SELECT "properties_isreg"
943
943
FROM __quesma_table_name
944
-
WHERE ((("@timestamp">=__quesma_from_unix_timestamp_ms(1710171234276) AND
945
-
"@timestamp"<=__quesma_from_unix_timestamp_ms(1710172134276)) AND
946
-
("@timestamp">=__quesma_from_unix_timestamp_ms(1710171234276) AND
947
-
"@timestamp"<=__quesma_from_unix_timestamp_ms(1710172134276))) AND "properties_isreg" IS NOT NULL)
944
+
WHERE ((("@timestamp">=fromUnixTimestamp64Milli(1710171234276) AND
945
+
"@timestamp"<=fromUnixTimestamp64Milli(1710172134276)) AND
946
+
("@timestamp">=fromUnixTimestamp64Milli(1710171234276) AND
947
+
"@timestamp"<=fromUnixTimestamp64Milli(1710172134276))) AND "properties_isreg" IS NOT NULL)
948
948
LIMIT 100`,
949
949
},
950
950
false,
@@ -1058,7 +1058,7 @@ var TestsSearch = []SearchTestCase{
1058
1058
model.ListAllFields,
1059
1059
[]string{
1060
1060
`SELECT "message" FROM `+TableName+` WHERE ("message" iLIKE '%user%' `+
1061
-
`AND ("@timestamp">=__quesma_from_unix_timestamp_ms(1705487298815) AND "@timestamp"<=__quesma_from_unix_timestamp_ms(1705488198815))) `+
1061
+
`AND ("@timestamp">=fromUnixTimestamp64Milli(1705487298815) AND "@timestamp"<=fromUnixTimestamp64Milli(1705488198815))) `+
1062
1062
`LIMIT 10`,
1063
1063
`SELECT count(*) AS "column_0" FROM `+TableName,
1064
1064
},
@@ -2087,7 +2087,7 @@ var TestsSearch = []SearchTestCase{
2087
2087
model.ListAllFields,
2088
2088
// TestSearchHandler is pretty blunt with config loading so the test below can't be used.
2089
2089
// We will probably refactor it as we move forwards with schema which will get even more side-effecting
2090
-
[]string{`SELECT "message" FROM `+TableName+` WHERE ("@timestamp">=__quesma_from_unix_timestamp_ms(1705915570299) AND "@timestamp" = toDateTime64('2024-05-24 13:32:47.307',3)) LIMIT 10`},
2090
+
[]string{`SELECT "message" FROM `+TableName+` WHERE ("@timestamp">=fromUnixTimestamp64Milli(1705915570299) AND "@timestamp" = toDateTime64('2024-05-24 13:32:47.307',3)) LIMIT 10`},
2091
2091
[]string{},
2092
2092
},
2093
2093
{ // [35] Comments in queries
@@ -2142,7 +2142,7 @@ var TestsSearch = []SearchTestCase{
2142
2142
`SELECT "message" `+
2143
2143
`FROM `+TableName+` `+
2144
2144
`WHERE ("cliIP" IN tuple('2601:204:c503:c240:9c41:5531:ad94:4d90', '50.116.43.98', '75.246.0.64') `+
2145
-
`AND ("@timestamp">=__quesma_from_unix_timestamp_ms(1715817600000) AND "@timestamp"<=__quesma_from_unix_timestamp_ms(1715990399000))) `+
2145
+
`AND ("@timestamp">=fromUnixTimestamp64Milli(1715817600000) AND "@timestamp"<=fromUnixTimestamp64Milli(1715990399000))) `+
2146
2146
`LIMIT 1`,
2147
2147
},
2148
2148
[]string{},
@@ -2558,10 +2558,10 @@ var TestSearchFilter = []SearchTestCase{
2558
2558
model.Normal,
2559
2559
[]string{},
2560
2560
[]string{`
2561
-
SELECT toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS "aggr__0__key_0",
2561
+
SELECT toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS "aggr__0__key_0",
2562
2562
count(*) AS "aggr__0__count"
2563
2563
FROM __quesma_table_name
2564
-
GROUP BY toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS
2564
+
GROUP BY toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS
2565
2565
"aggr__0__key_0"
2566
2566
ORDER BY "aggr__0__key_0" ASC`,
2567
2567
},
@@ -2616,11 +2616,11 @@ var TestSearchFilter = []SearchTestCase{
2616
2616
[]string{},
2617
2617
[]string{
2618
2618
`SELECT sum(count(*)) OVER () AS "metric____quesma_total_count_col_0",
2619
-
toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS "aggr__0__key_0",
2619
+
toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS "aggr__0__key_0",
2620
2620
count(*) AS "aggr__0__count"
2621
2621
FROM __quesma_table_name
2622
2622
WHERE "@timestamp">subDate(now(), INTERVAL 15 minute)
2623
-
GROUP BY toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS
2623
+
GROUP BY toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS
2624
2624
"aggr__0__key_0"
2625
2625
ORDER BY "aggr__0__key_0" ASC`,
2626
2626
},
@@ -2677,12 +2677,12 @@ var TestSearchFilter = []SearchTestCase{
2677
2677
[]string{},
2678
2678
[]string{`
2679
2679
SELECT sum(count(*)) OVER () AS "metric____quesma_total_count_col_0",
2680
-
toInt64(__quesma_to_unix_timestamp_ms("@timestamp") / 30s) AS "aggr__0__key_0"
2681
-
, count(*) AS "aggr__0__count"
2680
+
toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS "aggr__0__key_0",
2681
+
count(*) AS "aggr__0__count"
2682
2682
FROM __quesma_table_name
2683
-
WHERE ("@timestamp">=__quesma_from_unix_timestamp_ms(1727858503270) AND
0 commit comments