@@ -1841,8 +1841,8 @@ var AggregationTests = []AggregationTestCase{
18411841 count(*) AS "aggr__0__1__count"
18421842 FROM __quesma_table_name
18431843 WHERE ("host.name" __quesma_match '%prometheus%' AND ("@timestamp">=
1844- fromUnixTimestamp64Milli (1706891809940) AND "@timestamp"<=
1845- fromUnixTimestamp64Milli (1707496609940)))
1844+ __quesma_from_unixtime64mili (1706891809940) AND "@timestamp"<=
1845+ __quesma_from_unixtime64mili (1707496609940)))
18461846 GROUP BY "severity" AS "aggr__0__key_0",
18471847 toInt64((toUnixTimestamp64Milli("@timestamp")+timeZoneOffset(toTimezone(
18481848 "@timestamp", 'Europe/Warsaw'))*1000) / 10800000) AS "aggr__0__1__key_0"))
@@ -2190,8 +2190,8 @@ var AggregationTests = []AggregationTestCase{
21902190 "order_date", 'Europe/Warsaw'))*1000) / 43200000) AS "aggr__1__2__key_0",
21912191 count(*) AS "aggr__1__2__count"
21922192 FROM __quesma_table_name
2193- WHERE (("order_date">=fromUnixTimestamp64Milli (1707213597034) AND "order_date"<=
2194- fromUnixTimestamp64Milli (1707818397034)) AND "taxful_total_price" > '250')
2193+ WHERE (("order_date">=__quesma_from_unixtime64mili (1707213597034) AND "order_date"<=
2194+ __quesma_from_unixtime64mili (1707818397034)) AND "taxful_total_price" > '250')
21952195 GROUP BY toInt64((toUnixTimestamp64Milli("order_date")+timeZoneOffset(toTimezone
21962196 ("order_date", 'Europe/Warsaw'))*1000) / 43200000) AS "aggr__1__2__key_0"
21972197 ORDER BY "aggr__1__2__key_0" ASC` ,
@@ -2202,8 +2202,8 @@ var AggregationTests = []AggregationTestCase{
22022202 "order_date", 'Europe/Warsaw'))*1000) / 43200000) AS "aggr__1__2__key_0",
22032203 count(*) AS "aggr__1__2__count"
22042204 FROM __quesma_table_name
2205- WHERE (("order_date">=fromUnixTimestamp64Milli (1707213597034) AND "order_date"
2206- <=fromUnixTimestamp64Milli (1707818397034)) AND "taxful_total_price" > '250')
2205+ WHERE (("order_date">=__quesma_from_unixtime64mili (1707213597034) AND "order_date"
2206+ <=__quesma_from_unixtime64mili (1707818397034)) AND "taxful_total_price" > '250')
22072207 GROUP BY toInt64((toUnixTimestamp64Milli("order_date")+timeZoneOffset(
22082208 toTimezone("order_date", 'Europe/Warsaw'))*1000) / 43200000) AS
22092209 "aggr__1__2__key_0"
@@ -2220,8 +2220,8 @@ var AggregationTests = []AggregationTestCase{
22202220 __quesma_table_name AS "hit_table" ON ("group_table"."aggr__1__2__key_0"=
22212221 toInt64((toUnixTimestamp64Milli("order_date")+timeZoneOffset(toTimezone(
22222222 "order_date", 'Europe/Warsaw'))*1000) / 43200000))
2223- WHERE (("order_date">=fromUnixTimestamp64Milli (1707213597034) AND "order_date"
2224- <=fromUnixTimestamp64Milli (1707818397034)) AND "taxful_total_price" > '250'))
2223+ WHERE (("order_date">=__quesma_from_unixtime64mili (1707213597034) AND "order_date"
2224+ <=__quesma_from_unixtime64mili (1707818397034)) AND "taxful_total_price" > '250'))
22252225 SELECT "aggr__1__count", "aggr__1__2__key_0", "aggr__1__2__count",
22262226 "top_metrics__1__2__4_col_0", "top_metrics__1__2__4_col_1", "top_hits_rank"
22272227 FROM "quesma_top_hits_join"
@@ -2233,8 +2233,8 @@ var AggregationTests = []AggregationTestCase{
22332233 "order_date", 'Europe/Warsaw'))*1000) / 43200000) AS "aggr__1__2__key_0",
22342234 count(*) AS "aggr__1__2__count"
22352235 FROM __quesma_table_name
2236- WHERE (("order_date">=fromUnixTimestamp64Milli (1707213597034) AND "order_date"
2237- <=fromUnixTimestamp64Milli (1707818397034)) AND "taxful_total_price" > '250')
2236+ WHERE (("order_date">=__quesma_from_unixtime64mili (1707213597034) AND "order_date"
2237+ <=__quesma_from_unixtime64mili (1707818397034)) AND "taxful_total_price" > '250')
22382238 GROUP BY toInt64((toUnixTimestamp64Milli("order_date")+timeZoneOffset(
22392239 toTimezone("order_date", 'Europe/Warsaw'))*1000) / 43200000) AS
22402240 "aggr__1__2__key_0"
@@ -2251,8 +2251,8 @@ var AggregationTests = []AggregationTestCase{
22512251 __quesma_table_name AS "hit_table" ON ("group_table"."aggr__1__2__key_0"=
22522252 toInt64((toUnixTimestamp64Milli("order_date")+timeZoneOffset(toTimezone(
22532253 "order_date", 'Europe/Warsaw'))*1000) / 43200000))
2254- WHERE (("order_date">=fromUnixTimestamp64Milli (1707213597034) AND "order_date"
2255- <=fromUnixTimestamp64Milli (1707818397034)) AND "taxful_total_price" > '250'))
2254+ WHERE (("order_date">=__quesma_from_unixtime64mili (1707213597034) AND "order_date"
2255+ <=__quesma_from_unixtime64mili (1707818397034)) AND "taxful_total_price" > '250'))
22562256 SELECT "aggr__1__count", "aggr__1__2__key_0", "aggr__1__2__count",
22572257 "top_metrics__1__2__5_col_0", "top_metrics__1__2__5_col_1", "top_hits_rank"
22582258 FROM "quesma_top_hits_join"
@@ -2451,8 +2451,8 @@ var AggregationTests = []AggregationTestCase{
24512451 FROM (
24522452 SELECT "host.name"
24532453 FROM __quesma_table_name
2454- WHERE (("@timestamp">=fromUnixTimestamp64Milli (1706009236820) AND "@timestamp"
2455- <=fromUnixTimestamp64Milli (1706010136820)) AND
2454+ WHERE (("@timestamp">=__quesma_from_unixtime64mili (1706009236820) AND "@timestamp"
2455+ <=__quesma_from_unixtime64mili (1706010136820)) AND
24562456 "__quesma_fulltext_field_name" iLIKE '%user%')
24572457 LIMIT 8000)
24582458 GROUP BY "host.name" AS "aggr__sample__top_values__key_0"
@@ -2597,7 +2597,7 @@ var AggregationTests = []AggregationTestCase{
25972597 FROM ` + TableName + `
25982598
25992599 WHERE (` + fullTextFieldName + ` iLIKE '%user%' AND
2600- ("@timestamp">=fromUnixTimestamp64Milli (1706020999481) AND "@timestamp"<=fromUnixTimestamp64Milli (1706021899481)))
2600+ ("@timestamp">=__quesma_from_unixtime64mili (1706020999481) AND "@timestamp"<=__quesma_from_unixtime64mili (1706021899481)))
26012601 GROUP BY toInt64(toUnixTimestamp64Milli("@timestamp") / 30000) AS
26022602 "aggr__0__key_0"
26032603 ORDER BY "aggr__0__key_0" ASC` ,
@@ -2737,7 +2737,7 @@ var AggregationTests = []AggregationTestCase{
27372737 toInt64(toUnixTimestamp64Milli("@timestamp") / 60000) AS
27382738 "aggr__stats__series__key_0", count(*) AS "aggr__stats__series__count"
27392739 FROM ` + TableName + `
2740- WHERE ("@timestamp">fromUnixTimestamp64Milli (1706194439033) AND "@timestamp"<=fromUnixTimestamp64Milli (1706195339033))
2740+ WHERE ("@timestamp">__quesma_from_unixtime64mili (1706194439033) AND "@timestamp"<=__quesma_from_unixtime64mili (1706195339033))
27412741 GROUP BY COALESCE("event.dataset", 'unknown') AS "aggr__stats__key_0",
27422742 toInt64(toUnixTimestamp64Milli("@timestamp") / 60000) AS
27432743 "aggr__stats__series__key_0"))
@@ -2972,7 +2972,7 @@ var AggregationTests = []AggregationTestCase{
29722972 "aggr__0__key_0", count(*) AS "aggr__0__count",
29732973 sumOrNull("taxful_total_price") AS "metric__0__1_col_0"
29742974 FROM ` + TableName + `
2975- WHERE ("order_date">=fromUnixTimestamp64Milli (1708364456351) AND "order_date"<=fromUnixTimestamp64Milli (1708969256351))
2975+ WHERE ("order_date">=__quesma_from_unixtime64mili (1708364456351) AND "order_date"<=__quesma_from_unixtime64mili (1708969256351))
29762976 GROUP BY toInt64(toUnixTimestamp64Milli("order_date") / 86400000) AS
29772977 "aggr__0__key_0"
29782978 ORDER BY "aggr__0__key_0" ASC` ,
@@ -3082,8 +3082,8 @@ var AggregationTests = []AggregationTestCase{
30823082 SELECT sum(count(*)) OVER () AS "aggr__0__parent_count",
30833083 "message" AS "aggr__0__key_0", count(*) AS "aggr__0__count"
30843084 FROM __quesma_table_name
3085- WHERE ("timestamp">=fromUnixTimestamp64Milli (1708456413795) AND "timestamp"<=
3086- fromUnixTimestamp64Milli (1708488074920))
3085+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1708456413795) AND "timestamp"<=
3086+ __quesma_from_unixtime64mili (1708488074920))
30873087 GROUP BY "message" AS "aggr__0__key_0"
30883088 ORDER BY "aggr__0__count" DESC, "aggr__0__key_0" ASC
30893089 LIMIT 4` ,
@@ -3275,7 +3275,7 @@ var AggregationTests = []AggregationTestCase{
32753275 sumOrNullIf("taxful_total_price", "products.product_name" __quesma_match '%watch%') AS
32763276 "metric__0__1-bucket__1-metric_col_0"
32773277 FROM ` + TableName + `
3278- WHERE ("order_date">=fromUnixTimestamp64Milli (1708627654149) AND "order_date"<=fromUnixTimestamp64Milli (1709232454149))
3278+ WHERE ("order_date">=__quesma_from_unixtime64mili (1708627654149) AND "order_date"<=__quesma_from_unixtime64mili (1709232454149))
32793279 GROUP BY toInt64(toUnixTimestamp64Milli("order_date") / 43200000) AS
32803280 "aggr__0__key_0"
32813281 ORDER BY "aggr__0__key_0" ASC` ,
@@ -3502,12 +3502,12 @@ var AggregationTests = []AggregationTestCase{
35023502 sumOrNull("taxful_total_price") AS "metric__time_offset_split__0__1_col_0",
35033503 sumOrNull("taxful_total_price") AS "metric__time_offset_split__0__2_col_0"
35043504 FROM __quesma_table_name
3505- WHERE ((("order_date">=fromUnixTimestamp64Milli (1708639056376) AND "order_date"
3506- <=fromUnixTimestamp64Milli (1709243856376)) OR ("order_date">=
3507- fromUnixTimestamp64Milli (1708034256376) AND "order_date"<=
3508- fromUnixTimestamp64Milli (1708639056376))) AND ("order_date">=
3509- fromUnixTimestamp64Milli (1708639056376) AND "order_date"<=
3510- fromUnixTimestamp64Milli (1709243856376)))
3505+ WHERE ((("order_date">=__quesma_from_unixtime64mili (1708639056376) AND "order_date"
3506+ <=__quesma_from_unixtime64mili (1709243856376)) OR ("order_date">=
3507+ __quesma_from_unixtime64mili (1708034256376) AND "order_date"<=
3508+ __quesma_from_unixtime64mili (1708639056376))) AND ("order_date">=
3509+ __quesma_from_unixtime64mili (1708639056376) AND "order_date"<=
3510+ __quesma_from_unixtime64mili (1709243856376)))
35113511 GROUP BY toInt64(toUnixTimestamp64Milli("order_date") / 86400000) AS
35123512 "aggr__time_offset_split__0__key_0"
35133513 ORDER BY "aggr__time_offset_split__0__key_0" ASC` ,
@@ -3519,12 +3519,12 @@ var AggregationTests = []AggregationTestCase{
35193519 sumOrNull("taxful_total_price") AS "metric__time_offset_split__0__1_col_0",
35203520 sumOrNull("taxful_total_price") AS "metric__time_offset_split__0__2_col_0"
35213521 FROM __quesma_table_name
3522- WHERE ((("order_date">=fromUnixTimestamp64Milli (1708639056376) AND
3523- "order_date"<=fromUnixTimestamp64Milli (1709243856376)) OR
3524- ("order_date">=fromUnixTimestamp64Milli (1708034256376) AND
3525- "order_date"<=fromUnixTimestamp64Milli (1708639056376))) AND
3526- ("order_date">=fromUnixTimestamp64Milli (1708034256376) AND
3527- "order_date"<=fromUnixTimestamp64Milli (1708639056376)))
3522+ WHERE ((("order_date">=__quesma_from_unixtime64mili (1708639056376) AND
3523+ "order_date"<=__quesma_from_unixtime64mili (1709243856376)) OR
3524+ ("order_date">=__quesma_from_unixtime64mili (1708034256376) AND
3525+ "order_date"<=__quesma_from_unixtime64mili (1708639056376))) AND
3526+ ("order_date">=__quesma_from_unixtime64mili (1708034256376) AND
3527+ "order_date"<=__quesma_from_unixtime64mili (1708639056376)))
35283528 GROUP BY toInt64(toUnixTimestamp64Milli("order_date") / 86400000) AS
35293529 "aggr__time_offset_split__0__key_0"
35303530 ORDER BY "aggr__time_offset_split__0__key_0" ASC` ,
@@ -3661,7 +3661,7 @@ var AggregationTests = []AggregationTestCase{
36613661 FROM (
36623662 SELECT "@timestamp"
36633663 FROM ` + TableName + `
3664- WHERE ("@timestamp">=fromUnixTimestamp64Milli (1709815794995) AND "@timestamp"<=fromUnixTimestamp64Milli (1709816694995))
3664+ WHERE ("@timestamp">=__quesma_from_unixtime64mili (1709815794995) AND "@timestamp"<=__quesma_from_unixtime64mili (1709816694995))
36653665 LIMIT 20000)
36663666 GROUP BY toInt64(toUnixTimestamp64Milli("@timestamp") / 15000) AS
36673667 "aggr__sampler__eventRate__key_0"
@@ -4036,8 +4036,8 @@ var AggregationTests = []AggregationTestCase{
40364036 FROM (
40374037 SELECT "bytes_gauge"
40384038 FROM __quesma_table_name
4039- WHERE ("timestamp">=fromUnixTimestamp64Milli (1709932426749) AND "timestamp"<=
4040- fromUnixTimestamp64Milli (1711228426749))
4039+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1709932426749) AND "timestamp"<=
4040+ __quesma_from_unixtime64mili (1711228426749))
40414041 LIMIT 20000)` ,
40424042 ExpectedAdditionalPancakeSQLs : []string {`
40434043 SELECT sum(count(*)) OVER () AS "aggr__sample__count",
@@ -4127,8 +4127,8 @@ var AggregationTests = []AggregationTestCase{
41274127 FROM (
41284128 SELECT "bytes_gauge"
41294129 FROM __quesma_table_name
4130- WHERE ("timestamp">=fromUnixTimestamp64Milli (1709932426749) AND "timestamp"<=
4131- fromUnixTimestamp64Milli (1711228426749))
4130+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1709932426749) AND "timestamp"<=
4131+ __quesma_from_unixtime64mili (1711228426749))
41324132 LIMIT 20000)
41334133 GROUP BY "bytes_gauge" AS "aggr__sample__bytes_gauge_top__key_0"
41344134 ORDER BY "aggr__sample__bytes_gauge_top__count" DESC,
@@ -4340,8 +4340,8 @@ var AggregationTests = []AggregationTestCase{
43404340 countIf("bytes_gauge"<6.555) AS "range_3__aggr__2__count",
43414341 countIf("bytes_gauge" IS NOT NULL) AS "range_4__aggr__2__count"
43424342 FROM __quesma_table_name
4343- WHERE ("timestamp">=fromUnixTimestamp64Milli (1713269711790) AND "timestamp"<=
4344- fromUnixTimestamp64Milli (1713270611790))` ,
4343+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1713269711790) AND "timestamp"<=
4344+ __quesma_from_unixtime64mili (1713270611790))` ,
43454345 ExpectedAdditionalPancakeSQLs : []string {`
43464346 SELECT countIf(("bytes_gauge">=0 AND "bytes_gauge"<1000)) AS
43474347 "range_0__aggr__3__count",
@@ -4351,8 +4351,8 @@ var AggregationTests = []AggregationTestCase{
43514351 countIf("bytes_gauge"<6.555) AS "range_3__aggr__3__count",
43524352 countIf("bytes_gauge" IS NOT NULL) AS "range_4__aggr__3__count"
43534353 FROM __quesma_table_name
4354- WHERE ("timestamp">=fromUnixTimestamp64Milli (1713269711790) AND "timestamp"<=
4355- fromUnixTimestamp64Milli (1713270611790))` ,
4354+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1713269711790) AND "timestamp"<=
4355+ __quesma_from_unixtime64mili (1713270611790))` ,
43564356 },
43574357 },
43584358 { // [22]
@@ -4492,7 +4492,7 @@ var AggregationTests = []AggregationTestCase{
44924492 countIf("timestamp">=toInt64(toUnixTimestamp('2024-04-14'))) AS
44934493 "range_2__aggr__2__count"
44944494 FROM ` + TableName + `
4495- WHERE ("timestamp">=fromUnixTimestamp64Milli (1712388530059) AND "timestamp"<=fromUnixTimestamp64Milli (1713288530059))` ,
4495+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1712388530059) AND "timestamp"<=__quesma_from_unixtime64mili (1713288530059))` ,
44964496 },
44974497 { // [23]
44984498 TestName : "significant terms aggregation: same as terms for now" ,
@@ -4828,7 +4828,7 @@ var AggregationTests = []AggregationTestCase{
48284828 SELECT floor("bytes"/100)*100 AS "aggr__2__key_0",
48294829 count(*) AS "aggr__2__count"
48304830 FROM ` + TableName + `
4831- WHERE ("timestamp">=fromUnixTimestamp64Milli (1715348876077) AND "timestamp"<=fromUnixTimestamp64Milli (1715349776077))
4831+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1715348876077) AND "timestamp"<=__quesma_from_unixtime64mili (1715349776077))
48324832 GROUP BY floor("bytes"/100)*100 AS "aggr__2__key_0"
48334833 ORDER BY "aggr__2__key_0" ASC` ,
48344834 },
@@ -4966,8 +4966,8 @@ var AggregationTests = []AggregationTestCase{
49664966 SELECT toInt64(toUnixTimestamp64Milli("timestamp") / 30000) AS "aggr__2__key_0",
49674967 count(*) AS "aggr__2__count"
49684968 FROM __quesma_table_name
4969- WHERE ("timestamp">=fromUnixTimestamp64Milli (1715351342900) AND "timestamp"<=
4970- fromUnixTimestamp64Milli (1715352242900))
4969+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1715351342900) AND "timestamp"<=
4970+ __quesma_from_unixtime64mili (1715352242900))
49714971 GROUP BY toInt64(toUnixTimestamp64Milli("timestamp") / 30000) AS
49724972 "aggr__2__key_0"
49734973 ORDER BY "aggr__2__key_0" ASC` ,
@@ -5690,7 +5690,7 @@ var AggregationTests = []AggregationTestCase{
56905690 "machine.os" AS "aggr__2__key_0", count(*) AS "aggr__2__count",
56915691 uniq("clientip") AS "metric__2__1_col_0"
56925692 FROM __quesma_table_name
5693- WHERE ("timestamp">=fromUnixTimestamp64Milli (1715322159037) AND "timestamp"<=fromUnixTimestamp64Milli (1715376159037))
5693+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1715322159037) AND "timestamp"<=__quesma_from_unixtime64mili (1715376159037))
56945694 GROUP BY "machine.os" AS "aggr__2__key_0"
56955695 ORDER BY "metric__2__1_col_0" DESC, "aggr__2__key_0" ASC
56965696 LIMIT 6` ,
@@ -6202,8 +6202,8 @@ var AggregationTests = []AggregationTestCase{
62026202 stddevPop("bytes") AS "metric__0__2_col_8",
62036203 stddevSamp("bytes") AS "metric__0__2_col_9"
62046204 FROM __quesma_table_name
6205- WHERE ("timestamp">=fromUnixTimestamp64Milli (1716327334210) AND "timestamp"<=
6206- fromUnixTimestamp64Milli (1716381334210))
6205+ WHERE ("timestamp">=__quesma_from_unixtime64mili (1716327334210) AND "timestamp"<=
6206+ __quesma_from_unixtime64mili (1716381334210))
62076207 GROUP BY toInt64((toUnixTimestamp64Milli("timestamp")+timeZoneOffset(toTimezone(
62086208 "timestamp", 'Europe/Warsaw'))*1000) / 600000) AS "aggr__0__key_0"
62096209 ORDER BY "aggr__0__key_0" ASC` ,
0 commit comments