diff --git a/jest.config.js b/jest.config.js index 85caef4e..ba622f5f 100644 --- a/jest.config.js +++ b/jest.config.js @@ -2,6 +2,6 @@ const path = require('path') module.exports = { setupFilesAfterEnv: [path.join(__dirname, '/test/jest.setup.js')], moduleNameMapper: { - '^axios$': 'axios/dist/node/axios.cjs' + '^axios$': require.resolve('axios'),//'axios/dist/node/axios.cjs' } } diff --git a/parser/bnf.js b/parser/bnf.js index a0635c56..b4985ce0 100644 --- a/parser/bnf.js +++ b/parser/bnf.js @@ -79,21 +79,35 @@ compiler._ParseScript = compiler.ParseScript compiler.ParseScript = function (script) { const qLiterals = [] const aqLiterals = [] - const quotedStrings = script.replaceAll(/"([^"\\]|\\.)*"/g, (str) => { - if (str.length < 512) { - return str + let _script = script + let res = '' + let qsMatch = _script.match(/^([^"]*)("([^"\\]|\\.)*")?/) + while (qsMatch && qsMatch[0]) { + let repl = qsMatch[2] || '' + if (repl.length > 512) { + qLiterals.push(repl) + repl = `"QL_${qLiterals.length - 1}"` } - qLiterals.push(str) - return `"QL_${qLiterals.length - 1}"` - }) - const aQuotedStrings = quotedStrings.replaceAll(/`([^`\\]|\\.)*`/g, (str) => { - if (str.length < 512) { - return str + res = res + qsMatch[1] + repl + _script = _script.slice(qsMatch[0].length) + qsMatch = _script.match(/^([^"]*)("([^"\\]|\\.)*")?/) + } + + _script = res + res = '' + qsMatch = _script.match(/^([^`]*)(`([^`\\]|\\.)*`)?/) + while (qsMatch && qsMatch[0]) { + let repl = qsMatch[2] || '' + if (repl.length > 512) { + aqLiterals.push(repl) + repl = `\`AL_${qLiterals.length - 1}\`` } - aqLiterals.push(str) - return `\`AL_${aqLiterals.length - 1}\`` - }) - const parsedScript = this._ParseScript(aQuotedStrings) + res = res + qsMatch[1] + repl + _script = _script.slice(qsMatch[0].length) + qsMatch = _script.match(/^([^`]*)(`([^`\\]|\\.)*`)?/) + } + + const parsedScript = this._ParseScript(res) if (!parsedScript) { return parsedScript } diff --git a/qryn_node.js b/qryn_node.js index 38e48349..6a10b4e4 100755 --- a/qryn_node.js +++ b/qryn_node.js @@ -124,7 +124,7 @@ let fastify = require('fastify')({ done() })) await fastify.register(require('@fastify/compress'), { - encodings: ['gzip'], + encodings: ['gzip']/*, zlib: { createGzip: () => { const deflator = new pako.Deflate({ gzip: true }) @@ -152,7 +152,7 @@ let fastify = require('fastify')({ } return res } - } + }*/ }) await fastify.register(require('@fastify/url-data')) await fastify.register(require('@fastify/websocket')) diff --git a/test/__snapshots__/parser.test.js.snap b/test/__snapshots__/parser.test.js.snap index 7c41b4f9..9d5fa0f5 100644 --- a/test/__snapshots__/parser.test.js.snap +++ b/test/__snapshots__/parser.test.js.snap @@ -1,8 +1,8 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should compile regex 1`] = ` -"SCRIPT: abcd\\\\( - SYNTAX: abcd\\\\( +"SCRIPT: abcd\\( + SYNTAX: abcd\\( literal: a letter: a literal: b @@ -11,20 +11,20 @@ exports[`should compile regex 1`] = ` letter: c literal: d letter: d - literal: \\\\( - quoted_brack: \\\\( + literal: \\( + quoted_brack: \\( " `; exports[`should compile regex 2`] = ` -"SCRIPT: (a\\\\(bc) - SYNTAX: (a\\\\(bc) - any_group: (a\\\\(bc) - group_tail: a\\\\(bc +"SCRIPT: (a\\(bc) + SYNTAX: (a\\(bc) + any_group: (a\\(bc) + group_tail: a\\(bc literal: a letter: a - literal: \\\\( - quoted_brack: \\\\( + literal: \\( + quoted_brack: \\( literal: b letter: b literal: c @@ -33,26 +33,26 @@ exports[`should compile regex 2`] = ` `; exports[`should compile regex 3`] = ` -"SCRIPT: (?a[^\\\\[\\\\(\\\\)]bc) - SYNTAX: (?a[^\\\\[\\\\(\\\\)]bc) - any_group: (?a[^\\\\[\\\\(\\\\)]bc) +"SCRIPT: (?a[^\\[\\(\\)]bc) + SYNTAX: (?a[^\\[\\(\\)]bc) + any_group: (?a[^\\[\\(\\)]bc) group_name: ? label: label1 - group_tail: a[^\\\\[\\\\(\\\\)]bc + group_tail: a[^\\[\\(\\)]bc literal: a letter: a literal: [ letter: [ literal: ^ letter: ^ - literal: \\\\ - letter: \\\\ + literal: \\ + letter: \\ literal: [ letter: [ - literal: \\\\( - quoted_brack: \\\\( - literal: \\\\) - quoted_brack: \\\\) + literal: \\( + quoted_brack: \\( + literal: \\) + quoted_brack: \\) literal: ] letter: ] literal: b @@ -63,28 +63,28 @@ exports[`should compile regex 3`] = ` `; exports[`should compile regex 4`] = ` -"SCRIPT: (a(?[^\\\\[\\\\(\\\\)]bc)) - SYNTAX: (a(?[^\\\\[\\\\(\\\\)]bc)) - any_group: (a(?[^\\\\[\\\\(\\\\)]bc)) - group_tail: a(?[^\\\\[\\\\(\\\\)]bc) +"SCRIPT: (a(?[^\\[\\(\\)]bc)) + SYNTAX: (a(?[^\\[\\(\\)]bc)) + any_group: (a(?[^\\[\\(\\)]bc)) + group_tail: a(?[^\\[\\(\\)]bc) literal: a letter: a - any_group: (?[^\\\\[\\\\(\\\\)]bc) + any_group: (?[^\\[\\(\\)]bc) group_name: ? label: label1 - group_tail: [^\\\\[\\\\(\\\\)]bc + group_tail: [^\\[\\(\\)]bc literal: [ letter: [ literal: ^ letter: ^ - literal: \\\\ - letter: \\\\ + literal: \\ + letter: \\ literal: [ letter: [ - literal: \\\\( - quoted_brack: \\\\( - literal: \\\\) - quoted_brack: \\\\) + literal: \\( + quoted_brack: \\( + literal: \\) + quoted_brack: \\) literal: ] letter: ] literal: b @@ -95,18 +95,18 @@ exports[`should compile regex 4`] = ` `; exports[`should compile regex 5`] = ` -"SCRIPT: (a[\\\\(\\\\)]+(?b)(?[^\\\\[\\\\(\\\\)]bc)) - SYNTAX: (a[\\\\(\\\\)]+(?b)(?[^\\\\[\\\\(\\\\)]bc)) - any_group: (a[\\\\(\\\\)]+(?b)(?[^\\\\[\\\\(\\\\)]bc)) - group_tail: a[\\\\(\\\\)]+(?b)(?[^\\\\[\\\\(\\\\)]bc) +"SCRIPT: (a[\\(\\)]+(?b)(?[^\\[\\(\\)]bc)) + SYNTAX: (a[\\(\\)]+(?b)(?[^\\[\\(\\)]bc)) + any_group: (a[\\(\\)]+(?b)(?[^\\[\\(\\)]bc)) + group_tail: a[\\(\\)]+(?b)(?[^\\[\\(\\)]bc) literal: a letter: a literal: [ letter: [ - literal: \\\\( - quoted_brack: \\\\( - literal: \\\\) - quoted_brack: \\\\) + literal: \\( + quoted_brack: \\( + literal: \\) + quoted_brack: \\) literal: ] letter: ] literal: + @@ -117,22 +117,22 @@ exports[`should compile regex 5`] = ` group_tail: b literal: b letter: b - any_group: (?[^\\\\[\\\\(\\\\)]bc) + any_group: (?[^\\[\\(\\)]bc) group_name: ? label: label1 - group_tail: [^\\\\[\\\\(\\\\)]bc + group_tail: [^\\[\\(\\)]bc literal: [ letter: [ literal: ^ letter: ^ - literal: \\\\ - letter: \\\\ + literal: \\ + letter: \\ literal: [ letter: [ - literal: \\\\( - quoted_brack: \\\\( - literal: \\\\) - quoted_brack: \\\\) + literal: \\( + quoted_brack: \\( + literal: \\) + quoted_brack: \\) literal: ] letter: ] literal: b @@ -142,71 +142,71 @@ exports[`should compile regex 5`] = ` " `; -exports[`should erase names 1`] = `"abcd\\\\("`; +exports[`should erase names 1`] = `"abcd\\("`; -exports[`should erase names 2`] = `"(a\\\\(bc)"`; +exports[`should erase names 2`] = `"(a\\(bc)"`; -exports[`should erase names 3`] = `"(a[^\\\\[\\\\(\\\\)]bc)"`; +exports[`should erase names 3`] = `"(a[^\\[\\(\\)]bc)"`; -exports[`should erase names 4`] = `"(a([^\\\\[\\\\(\\\\)]bc))"`; +exports[`should erase names 4`] = `"(a([^\\[\\(\\)]bc))"`; -exports[`should erase names 5`] = `"(a[\\\\(\\\\)]+(b)([^\\\\[\\\\(\\\\)]bc))"`; +exports[`should erase names 5`] = `"(a[\\(\\)]+(b)([^\\[\\(\\)]bc))"`; -exports[`should get named groups 1`] = `Array []`; +exports[`should get named groups 1`] = `[]`; exports[`should get named groups 2`] = ` -Array [ - Object { - "val": "a\\\\(bc", +[ + { + "val": "a\\(bc", }, ] `; exports[`should get named groups 3`] = ` -Array [ - Object { +[ + { "name": "label1", - "val": "a[^\\\\[\\\\(\\\\)]bc", + "val": "a[^\\[\\(\\)]bc", }, ] `; exports[`should get named groups 4`] = ` -Array [ - Object { - "val": "a(?[^\\\\[\\\\(\\\\)]bc)", +[ + { + "val": "a(?[^\\[\\(\\)]bc)", }, - Object { + { "name": "label1", - "val": "[^\\\\[\\\\(\\\\)]bc", + "val": "[^\\[\\(\\)]bc", }, ] `; exports[`should get named groups 5`] = ` -Array [ - Object { - "val": "a[\\\\(\\\\)]+(?b)(?[^\\\\[\\\\(\\\\)]bc)", +[ + { + "val": "a[\\(\\)]+(?b)(?[^\\[\\(\\)]bc)", }, - Object { + { "name": "l2", "val": "b", }, - Object { + { "name": "label1", - "val": "[^\\\\[\\\\(\\\\)]bc", + "val": "[^\\[\\(\\)]bc", }, ] `; exports[`should process regex 1`] = ` -Object { - "labels": Array [ - Object { +{ + "labels": [ + { "name": "helper", "val": "[a-zA-Z0-9]+", }, - Object { + { "name": "token", "val": "[a-zA-Z]+", }, diff --git a/test/__snapshots__/transpiler.test.js.snap b/test/__snapshots__/transpiler.test.js.snap index 96261a19..415e0654 100644 --- a/test/__snapshots__/transpiler.test.js.snap +++ b/test/__snapshots__/transpiler.test.js.snap @@ -2,14 +2,14 @@ exports[`log_range_aggregation 1 1`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -18,22 +18,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -64,44 +64,44 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 300000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -112,7 +112,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -134,39 +134,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -194,33 +194,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -228,7 +228,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -240,7 +240,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -249,18 +249,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -291,20 +291,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -312,8 +312,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -323,50 +323,50 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -394,33 +394,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -428,19 +428,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -451,7 +451,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -473,39 +473,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -533,33 +533,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -567,7 +567,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -579,7 +579,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -588,18 +588,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -630,20 +630,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -651,8 +651,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -662,7 +662,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -673,14 +673,14 @@ exports[`log_range_aggregation 1 2`] = `"WITH idx_sel AS (select \`sel_1\`.\`fin exports[`log_range_aggregation 2 1`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -689,22 +689,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -735,44 +735,44 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 300000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -783,7 +783,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -805,39 +805,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -869,33 +869,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -903,7 +903,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -924,7 +924,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -933,18 +933,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -975,20 +975,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -996,8 +996,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -1007,50 +1007,50 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -1082,33 +1082,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -1116,19 +1116,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -1139,7 +1139,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -1161,39 +1161,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -1225,33 +1225,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -1259,7 +1259,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -1280,7 +1280,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -1289,18 +1289,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -1331,20 +1331,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -1352,8 +1352,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -1363,7 +1363,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -1374,14 +1374,14 @@ exports[`log_range_aggregation 2 2`] = `"WITH idx_sel AS (select \`sel_1\`.\`fin exports[`log_range_aggregation 3 1`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -1390,22 +1390,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -1436,44 +1436,44 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 300000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -1484,7 +1484,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -1506,39 +1506,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -1566,33 +1566,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -1600,7 +1600,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -1621,7 +1621,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -1630,18 +1630,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -1672,20 +1672,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -1693,8 +1693,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -1704,50 +1704,50 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -1775,33 +1775,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -1809,19 +1809,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -1832,7 +1832,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -1854,39 +1854,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -1914,33 +1914,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -1948,7 +1948,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -1969,7 +1969,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "idxId": 1, "matrix": true, @@ -1978,18 +1978,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -2020,20 +2020,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -2041,8 +2041,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -2052,7 +2052,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -2063,14 +2063,14 @@ exports[`log_range_aggregation 3 2`] = `"WITH idx_sel AS (select \`sel_1\`.\`fin exports[`log_range_aggregation 4 1`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 1000, "idxId": 1, "matrix": true, @@ -2079,22 +2079,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -2125,70 +2125,70 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, 5000) * 5000", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -2220,33 +2220,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -2254,19 +2254,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -2277,7 +2277,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -2299,39 +2299,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -2363,33 +2363,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -2397,7 +2397,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -2418,7 +2418,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 1000, "idxId": 1, "matrix": true, @@ -2427,18 +2427,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -2469,20 +2469,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -2490,8 +2490,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -2501,79 +2501,79 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_b": With { "alias": "rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 1000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -2584,7 +2584,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -2606,39 +2606,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -2670,33 +2670,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -2704,7 +2704,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -2725,7 +2725,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 1000, "idxId": 1, "matrix": true, @@ -2734,18 +2734,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -2776,20 +2776,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -2797,8 +2797,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -2808,13 +2808,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -2825,14 +2825,14 @@ exports[`log_range_aggregation 4 2`] = `"WITH idx_sel AS (select \`sel_1\`.\`fin exports[`shoud transpile unwrap 1`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -2841,22 +2841,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -2887,72 +2887,72 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, 120000) * 120000", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(uw_rate_b.value, uw_rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arraySort(arrayFilter(x -> arrayExists(y -> x.1 == y, ['fmt']) != 0, labels))", }, "labels", ], - Array [ + [ Raw { "raw": "SUM(unwrapped) / 60", }, "value", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -2960,19 +2960,19 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -2983,7 +2983,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -3005,39 +3005,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -3065,33 +3065,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -3099,7 +3099,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -3111,7 +3111,7 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayExists(x -> x.1 == 'int_lbl', labels)", @@ -3139,7 +3139,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -3148,18 +3148,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -3190,35 +3190,35 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(arrayFirst(x -> x.1 == 'int_lbl', labels).2)", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -3228,56 +3228,56 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -3305,33 +3305,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -3339,19 +3339,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "uw_rate_a": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -3362,7 +3362,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -3384,39 +3384,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -3444,33 +3444,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -3478,7 +3478,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -3490,7 +3490,7 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayExists(x -> x.1 == 'int_lbl', labels)", @@ -3518,7 +3518,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -3527,18 +3527,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -3569,35 +3569,35 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(arrayFirst(x -> x.1 == 'int_lbl', labels).2)", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -3607,53 +3607,53 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "uw_rate_b": With { "alias": "uw_rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arraySort(arrayFilter(x -> arrayExists(y -> x.1 == y, ['fmt']) != 0, labels))", }, "labels", ], - Array [ + [ Raw { "raw": "SUM(unwrapped) / 60", }, "value", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -3661,19 +3661,19 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -3684,7 +3684,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -3706,39 +3706,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -3766,33 +3766,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -3800,7 +3800,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -3812,7 +3812,7 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayExists(x -> x.1 == 'int_lbl', labels)", @@ -3840,7 +3840,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -3849,18 +3849,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -3891,35 +3891,35 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(arrayFirst(x -> x.1 == 'int_lbl', labels).2)", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -3929,13 +3929,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -3944,14 +3944,14 @@ Select { exports[`shoud transpile unwrap 2`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -3960,22 +3960,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -4006,72 +4006,72 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, 120000) * 120000", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(uw_rate_b.value, uw_rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arraySort(arrayFilter(x -> arrayExists(y -> x.1 == y, ['fmt']) != 0, arraySort(arrayConcat(arrayFilter(x -> arrayExists(y -> y.1 == x.1, extra_labels) == 0, labels), extra_labels))))", }, "labels", ], - Array [ + [ Raw { "raw": "SUM(unwrapped) / 60", }, "value", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -4079,19 +4079,19 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -4102,7 +4102,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -4124,39 +4124,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -4184,33 +4184,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -4218,7 +4218,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -4239,9 +4239,9 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Disjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayFirstIndex(x -> x.1 == 'int_lbl2', extra_labels)", @@ -4280,7 +4280,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -4289,18 +4289,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -4331,41 +4331,41 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('int_lbl2', if(JSONType(samples.string, 'int_val') == 'String', JSONExtractString(samples.string, 'int_val'), JSONExtractRaw(samples.string, 'int_val')))])", }, "extra_labels", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(if(arrayExists(x -> x.1 == 'int_lbl2', extra_labels), arrayFirst(x -> x.1 == 'int_lbl2', extra_labels).2, arrayFirst(x -> x.1 == 'int_lbl2', labels).2))", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -4375,56 +4375,56 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -4452,33 +4452,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -4486,19 +4486,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "uw_rate_a": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -4509,7 +4509,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -4531,39 +4531,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -4591,33 +4591,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -4625,7 +4625,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -4646,9 +4646,9 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Disjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayFirstIndex(x -> x.1 == 'int_lbl2', extra_labels)", @@ -4687,7 +4687,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -4696,18 +4696,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -4738,41 +4738,41 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('int_lbl2', if(JSONType(samples.string, 'int_val') == 'String', JSONExtractString(samples.string, 'int_val'), JSONExtractRaw(samples.string, 'int_val')))])", }, "extra_labels", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(if(arrayExists(x -> x.1 == 'int_lbl2', extra_labels), arrayFirst(x -> x.1 == 'int_lbl2', extra_labels).2, arrayFirst(x -> x.1 == 'int_lbl2', labels).2))", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -4782,53 +4782,53 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "uw_rate_b": With { "alias": "uw_rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arraySort(arrayFilter(x -> arrayExists(y -> x.1 == y, ['fmt']) != 0, arraySort(arrayConcat(arrayFilter(x -> arrayExists(y -> y.1 == x.1, extra_labels) == 0, labels), extra_labels))))", }, "labels", ], - Array [ + [ Raw { "raw": "SUM(unwrapped) / 60", }, "value", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -4836,19 +4836,19 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -4859,7 +4859,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -4881,39 +4881,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -4941,33 +4941,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -4975,7 +4975,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -4996,9 +4996,9 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Disjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayFirstIndex(x -> x.1 == 'int_lbl2', extra_labels)", @@ -5037,7 +5037,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -5046,18 +5046,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -5088,41 +5088,41 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('int_lbl2', if(JSONType(samples.string, 'int_val') == 'String', JSONExtractString(samples.string, 'int_val'), JSONExtractRaw(samples.string, 'int_val')))])", }, "extra_labels", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(if(arrayExists(x -> x.1 == 'int_lbl2', extra_labels), arrayFirst(x -> x.1 == 'int_lbl2', extra_labels).2, arrayFirst(x -> x.1 == 'int_lbl2', labels).2))", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -5132,13 +5132,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -5147,14 +5147,14 @@ Select { exports[`shoud transpile unwrap 3`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -5163,22 +5163,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -5209,72 +5209,72 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, 120000) * 120000", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(uw_rate_b.value, uw_rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arraySort(arrayFilter(x -> arrayExists(y -> x.1 == y, ['int_lbl2']) != 0, arraySort(arrayConcat(arrayFilter(x -> arrayExists(y -> y.1 == x.1, extra_labels) == 0, labels), extra_labels))))", }, "labels", ], - Array [ + [ Raw { "raw": "SUM(unwrapped) / 60", }, "value", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -5282,19 +5282,19 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -5305,7 +5305,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -5327,39 +5327,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -5387,33 +5387,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -5421,7 +5421,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -5442,9 +5442,9 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Disjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayFirstIndex(x -> x.1 == 'int_lbl', extra_labels)", @@ -5483,7 +5483,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -5492,18 +5492,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -5534,41 +5534,41 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('int_lbl2', if(JSONType(samples.string, 'int_val') == 'String', JSONExtractString(samples.string, 'int_val'), JSONExtractRaw(samples.string, 'int_val')))])", }, "extra_labels", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(if(arrayExists(x -> x.1 == 'int_lbl', extra_labels), arrayFirst(x -> x.1 == 'int_lbl', extra_labels).2, arrayFirst(x -> x.1 == 'int_lbl', labels).2))", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -5578,56 +5578,56 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -5655,33 +5655,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -5689,19 +5689,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "uw_rate_a": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -5712,7 +5712,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -5734,39 +5734,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -5794,33 +5794,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -5828,7 +5828,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -5849,9 +5849,9 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Disjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayFirstIndex(x -> x.1 == 'int_lbl', extra_labels)", @@ -5890,7 +5890,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -5899,18 +5899,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -5941,41 +5941,41 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('int_lbl2', if(JSONType(samples.string, 'int_val') == 'String', JSONExtractString(samples.string, 'int_val'), JSONExtractRaw(samples.string, 'int_val')))])", }, "extra_labels", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(if(arrayExists(x -> x.1 == 'int_lbl', extra_labels), arrayFirst(x -> x.1 == 'int_lbl', extra_labels).2, arrayFirst(x -> x.1 == 'int_lbl', labels).2))", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -5985,53 +5985,53 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "uw_rate_b": With { "alias": "uw_rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arraySort(arrayFilter(x -> arrayExists(y -> x.1 == y, ['int_lbl2']) != 0, arraySort(arrayConcat(arrayFilter(x -> arrayExists(y -> y.1 == x.1, extra_labels) == 0, labels), extra_labels))))", }, "labels", ], - Array [ + [ Raw { "raw": "SUM(unwrapped) / 60", }, "value", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -6039,19 +6039,19 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "uw_rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -6062,7 +6062,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -6084,39 +6084,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -6144,33 +6144,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -6178,7 +6178,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -6199,9 +6199,9 @@ Select { }, Condition { "column": Conjunction { - "args": Array [ + "args": [ Disjunction { - "args": Array [ + "args": [ Condition { "column": Raw { "raw": "arrayFirstIndex(x -> x.1 == 'int_lbl', extra_labels)", @@ -6240,7 +6240,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 60000, "idxId": 1, "matrix": true, @@ -6249,18 +6249,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": null, @@ -6291,41 +6291,41 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('int_lbl2', if(JSONType(samples.string, 'int_val') == 'String', JSONExtractString(samples.string, 'int_val'), JSONExtractRaw(samples.string, 'int_val')))])", }, "extra_labels", ], - Array [ + [ Raw { "raw": "toFloat64OrNull(if(arrayExists(x -> x.1 == 'int_lbl', extra_labels), arrayFirst(x -> x.1 == 'int_lbl', extra_labels).2, arrayFirst(x -> x.1 == 'int_lbl', labels).2))", }, "unwrapped", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": null, @@ -6335,13 +6335,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -6350,14 +6350,14 @@ Select { exports[`should transpile aggregation_operator 1`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -6367,16 +6367,16 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -6407,40 +6407,40 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arrayFilter(x -> x.1 IN ('label_1'), labels)", }, "labels", ], "timestamp_ns", - Array [ + [ Raw { "raw": "sum(value)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "agg_a", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -6450,22 +6450,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -6496,51 +6496,51 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, undefined) * undefined", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "agg_a": With { "alias": "agg_a", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -6550,22 +6550,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -6596,72 +6596,72 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, undefined) * undefined", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -6689,33 +6689,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -6723,19 +6723,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -6746,7 +6746,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -6768,39 +6768,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -6828,33 +6828,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -6862,7 +6862,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -6874,7 +6874,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -6884,18 +6884,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -6926,20 +6926,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -6947,8 +6947,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -6958,79 +6958,79 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_b": With { "alias": "rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 300000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -7041,7 +7041,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -7063,39 +7063,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -7123,33 +7123,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -7157,7 +7157,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -7169,7 +7169,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -7179,18 +7179,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -7221,20 +7221,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -7242,8 +7242,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -7253,13 +7253,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -7270,14 +7270,14 @@ exports[`should transpile aggregation_operator 2`] = `"WITH idx_sel AS (select \ exports[`should transpile aggregation_operator 3`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 2, @@ -7287,16 +7287,16 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -7327,40 +7327,40 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arrayFilter(x -> x.1 IN ('label_1'), labels)", }, "labels", ], "timestamp_ns", - Array [ + [ Raw { "raw": "sum(value)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "agg_a", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 2, @@ -7370,22 +7370,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -7416,51 +7416,51 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, undefined) * undefined", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "agg_a": With { "alias": "agg_a", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 2, @@ -7470,22 +7470,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -7516,72 +7516,72 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, undefined) * undefined", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_2.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -7613,33 +7613,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -7647,19 +7647,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -7670,7 +7670,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -7693,39 +7693,39 @@ Select { "fmt": undefined, "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -7753,33 +7753,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -7787,7 +7787,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -7806,39 +7806,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_2.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -7870,33 +7870,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -7904,7 +7904,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -7925,7 +7925,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 2, @@ -7935,18 +7935,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -7977,20 +7977,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -7998,8 +7998,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -8009,79 +8009,79 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_b": With { "alias": "rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 300000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -8092,7 +8092,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -8115,39 +8115,39 @@ Select { "fmt": undefined, "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -8175,33 +8175,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -8209,7 +8209,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -8228,39 +8228,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_2.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -8292,33 +8292,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -8326,7 +8326,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -8347,7 +8347,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 2, @@ -8357,18 +8357,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -8399,20 +8399,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -8420,8 +8420,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -8431,13 +8431,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -8448,14 +8448,14 @@ exports[`should transpile aggregation_operator 4`] = `"WITH idx_sel AS (select \ exports[`should transpile aggregation_operator 5`] = ` Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -8465,16 +8465,16 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ + "order_expressions": [ "labels", "timestamp_ns", ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -8505,40 +8505,40 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "arrayFilter(x -> x.1 IN ('label_1'), labels)", }, "labels", ], "timestamp_ns", - Array [ + [ Raw { "raw": "sum(value)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "agg_a", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -8548,22 +8548,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -8594,51 +8594,51 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, undefined) * undefined", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object { + "withs": { "agg_a": With { "alias": "agg_a", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -8648,22 +8648,22 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -8694,72 +8694,72 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "labels", - Array [ + [ Raw { "raw": "intDiv(timestamp_ns, undefined) * undefined", }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "argMin(rate_b.value, rate_b.timestamp_ns)", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "rate_b", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -8787,33 +8787,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -8821,19 +8821,19 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_a": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -8844,7 +8844,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -8866,39 +8866,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -8926,33 +8926,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -8960,7 +8960,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -8972,7 +8972,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -8982,18 +8982,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -9024,20 +9024,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -9045,8 +9045,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -9056,79 +9056,79 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, "rate_b": With { "alias": "rate_b", "inline": undefined, "query": Select { - "aggregations": Array [ + "aggregations": [ "labels", "timestamp_ns", ], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "labels", "asc", ], - Array [ + [ "timestamp_ns", "asc", ], ], - "params": Object {}, + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ Raw { "raw": "labels", }, "labels", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "toFloat64(count(1)) * 1000 / 300000", }, "value", ], ], - "tables": Array [ - Array [ + "tables": [ + [ WithReference { "ref": With { "alias": "rate_a", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -9139,7 +9139,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -9161,39 +9161,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -9221,33 +9221,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -9255,7 +9255,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -9267,7 +9267,7 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "duration": 300000, "end": 3600000, "idxId": 1, @@ -9277,18 +9277,18 @@ Select { "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -9319,20 +9319,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -9340,8 +9340,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -9351,13 +9351,13 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -9367,22 +9367,22 @@ Select { exports[`should transpile aggregation_operator 6`] = `"WITH idx_sel AS (select \`sel_1\`.\`fingerprint\` from (select \`fingerprint\` from \`loki\`.\`time_series_gin\` where ((\`key\` = 'minus_nam') and (\`val\` = 'aut illo'))) as \`sel_1\`), rate_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\` from loki.samples_vX as \`samples\` where ((\`samples\`.\`timestamp_ns\` between 1 and 2) and (\`samples\`.\`type\` in (0,0))) and (samples.fingerprint IN idx_sel) order by \`timestamp_ns\` desc), rate_b AS (select labels as \`labels\`,intDiv(timestamp_ns, 300000) * 300000 as \`timestamp_ns\`,toFloat64(count(1)) * 1000 / 300000 as \`value\` from rate_a group by \`labels\`,\`timestamp_ns\` order by \`labels\` asc,\`timestamp_ns\` asc), agg_a AS (select \`labels\`,intDiv(timestamp_ns, undefined) * undefined as \`timestamp_ns\`,argMin(rate_b.value, rate_b.timestamp_ns) as \`value\` from \`rate_b\` group by \`labels\`,\`timestamp_ns\` order by \`labels\` asc,\`timestamp_ns\` asc) select arrayFilter(x -> x.1 IN ('label_1'), labels) as \`labels\`,\`timestamp_ns\`,sum(value) as \`value\` from agg_a group by \`labels\`,\`timestamp_ns\` order by \`labels\`,\`timestamp_ns\`"`; exports[`should transpile complex pipelines 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '\${testID}')) and ((JSONHas(labels, 'freq') = 1) and (toFloat64OrNull(JSONExtractString(labels, 'freq')) >= '4'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 0000000 and 100000000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` asc limit 1000) select * from sel_a order by \`labels\` asc,\`timestamp_ns\` asc", - "stream": Array [], + "stream": [], } `; exports[`should transpile json requests 1`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -9393,7 +9393,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -9415,39 +9415,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -9475,33 +9475,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -9509,7 +9509,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -9530,30 +9530,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -9580,35 +9580,35 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], }, "timestamp_ns", ], - Array [ + [ Raw { "raw": "arrayFilter((x) -> x.2 != '', [('odit_iusto', if(JSONType(samples.string, 'dicta') == 'String', JSONExtractString(samples.string, 'dicta'), JSONExtractRaw(samples.string, 'dicta')))])", }, "extra_labels", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -9618,44 +9618,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -9683,33 +9683,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -9717,7 +9717,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -9725,23 +9725,23 @@ Select { `; exports[`should transpile json requests 2`] = ` -Array [ - Object { - "labels": Object { +[ + { + "labels": { "autem_quis": "quidem sit", "l1": "v3", "l2": "v2", "l3": "v4", }, - "string": "{\\"l1\\":\\"v3\\",\\"l3\\":\\"v4\\"}", + "string": "{\"l1\":\"v3\",\"l3\":\"v4\"}", }, ] `; exports[`should transpile line format 1`] = ` -Array [ - Object { - "labels": Object { +[ + { + "labels": { "int": 10, "lbl1": "a", }, @@ -9751,23 +9751,23 @@ Array [ `; exports[`should transpile line format 2`] = ` -Array [ - Object { - "labels": Object { +[ + { + "labels": { "entry": "str", "int": 10, "intval": "5", "lbl1": "a", }, - "string": "{ \\"entry\\": \\"str\\", \\"intval\\": 5 }", + "string": "{ \"entry\": \"str\", \"intval\": 5 }", }, ] `; exports[`should transpile line format 3`] = ` -Array [ - Object { - "labels": Object { +[ + { + "labels": { "entry": "str", "int": 10, "intval": "5", @@ -9776,7 +9776,7 @@ Array [ "timestamp_ns": "0", "value": 5, }, - Object { + { "EOF": true, }, ] @@ -9784,12 +9784,12 @@ Array [ exports[`should transpile log_stream_selector 1`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -9800,7 +9800,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -9822,19 +9822,19 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [ - Object { - "conditions": Array [ + "joins": [ + { + "conditions": [ Condition { "column": Term { "term": "sel_1.fingerprint", @@ -9850,12 +9850,12 @@ Select { "term": "sel_2", }, "sel": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -9883,33 +9883,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "type": " inner any ", @@ -9917,26 +9917,26 @@ Select { ], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -9964,33 +9964,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -9998,7 +9998,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -10010,30 +10010,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 2, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -10060,20 +10060,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -10081,8 +10081,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -10092,24 +10092,24 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [ - Object { - "conditions": Array [ + "joins": [ + { + "conditions": [ Condition { "column": Term { "term": "sel_1.fingerprint", @@ -10125,12 +10125,12 @@ Select { "term": "sel_2", }, "sel": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -10158,33 +10158,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "type": " inner any ", @@ -10192,26 +10192,26 @@ Select { ], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -10239,33 +10239,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -10273,7 +10273,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -10284,12 +10284,12 @@ exports[`should transpile log_stream_selector 2`] = `"WITH idx_sel AS (select \` exports[`should transpile log_stream_selector 3`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -10300,7 +10300,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -10322,39 +10322,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -10386,33 +10386,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -10420,7 +10420,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -10432,30 +10432,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -10482,20 +10482,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -10503,8 +10503,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -10514,44 +10514,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -10583,33 +10583,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -10617,7 +10617,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -10628,12 +10628,12 @@ exports[`should transpile log_stream_selector 4`] = `"WITH idx_sel AS (select \` exports[`should transpile log_stream_selector 5`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -10644,7 +10644,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -10666,39 +10666,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -10726,33 +10726,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -10760,7 +10760,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -10772,30 +10772,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -10822,20 +10822,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -10843,8 +10843,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -10854,44 +10854,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -10919,33 +10919,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -10953,7 +10953,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -10964,12 +10964,12 @@ exports[`should transpile log_stream_selector 6`] = `"WITH idx_sel AS (select \` exports[`should transpile log_stream_selector 7`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -10980,7 +10980,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -11002,39 +11002,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11066,33 +11066,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -11100,7 +11100,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -11112,30 +11112,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -11162,20 +11162,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -11183,8 +11183,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -11194,44 +11194,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11263,33 +11263,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -11297,7 +11297,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -11308,12 +11308,12 @@ exports[`should transpile log_stream_selector 8`] = `"WITH idx_sel AS (select \` exports[`should transpile log_stream_selector with stream filter 1`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -11324,7 +11324,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -11346,19 +11346,19 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [ - Object { - "conditions": Array [ + "joins": [ + { + "conditions": [ Condition { "column": Term { "term": "sel_1.fingerprint", @@ -11374,12 +11374,12 @@ Select { "term": "sel_2", }, "sel": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11407,33 +11407,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "type": " inner any ", @@ -11441,26 +11441,26 @@ Select { ], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11488,33 +11488,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -11522,7 +11522,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -11543,30 +11543,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 2, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -11593,20 +11593,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -11614,8 +11614,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -11625,24 +11625,24 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [ - Object { - "conditions": Array [ + "joins": [ + { + "conditions": [ Condition { "column": Term { "term": "sel_1.fingerprint", @@ -11658,12 +11658,12 @@ Select { "term": "sel_2", }, "sel": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11691,33 +11691,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, "type": " inner any ", @@ -11725,26 +11725,26 @@ Select { ], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11772,33 +11772,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -11806,7 +11806,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -11817,12 +11817,12 @@ exports[`should transpile log_stream_selector with stream filter 2`] = `"WITH id exports[`should transpile log_stream_selector with stream filter 3`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -11833,7 +11833,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -11855,39 +11855,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -11919,33 +11919,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -11953,7 +11953,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -11974,30 +11974,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -12024,20 +12024,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -12045,8 +12045,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -12056,44 +12056,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -12125,33 +12125,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -12159,7 +12159,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -12170,12 +12170,12 @@ exports[`should transpile log_stream_selector with stream filter 4`] = `"WITH id exports[`should transpile log_stream_selector with stream filter 5`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -12186,7 +12186,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -12208,39 +12208,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -12268,33 +12268,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -12302,7 +12302,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -12323,30 +12323,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -12373,20 +12373,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -12394,8 +12394,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -12405,44 +12405,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -12470,33 +12470,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -12504,7 +12504,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -12515,12 +12515,12 @@ exports[`should transpile log_stream_selector with stream filter 6`] = `"WITH id exports[`should transpile log_stream_selector with stream filter 7`] = ` Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Raw { "raw": "", "toString": [Function], @@ -12531,7 +12531,7 @@ Select { }, "operator": "in", "value": Value { - "value": Array [ + "value": [ 0, 0, ], @@ -12553,39 +12553,39 @@ Select { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -12617,33 +12617,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -12651,7 +12651,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -12672,30 +12672,30 @@ Select { }, ], }, - "ctx": Object { + "ctx": { "idxId": 1, }, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, - "limits": Object { + "limits": { "number": Parameter { "name": "limit", "value": 3, }, "offset": undefined, }, - "order_expressions": Array [ - Array [ + "order_expressions": [ + [ "timestamp_ns", "desc", ], ], - "params": Object { + "params": { "from": Parameter { "name": "from", "value": 1, @@ -12722,20 +12722,20 @@ Select { }, }, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ - Array [ + "select_list": [ + [ "samples.string", "string", ], - Array [ + [ "samples.fingerprint", "fingerprint", ], - Array [ + [ Raw { "raw": "", "toString": [Function], @@ -12743,8 +12743,8 @@ Select { "timestamp_ns", ], ], - "tables": Array [ - Array [ + "tables": [ + [ Parameter { "name": "samplesTable", "value": "loki.samples_vX", @@ -12754,44 +12754,44 @@ Select { }, ], ], - "withs": Object { + "withs": { "idx_sel": With { "alias": "idx_sel", "inline": undefined, "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [], + "args": [], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "sel_1.fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Subquery { "query": Select { - "aggregations": Array [], + "aggregations": [], "conditions": Conjunction { - "args": Array [ + "args": [ Condition { "column": Conjunction { - "args": Array [ + "args": [ Condition { "column": Term { "term": "key", @@ -12823,33 +12823,33 @@ Select { }, ], }, - "ctx": Object {}, + "ctx": {}, "dist": false, "fmt": undefined, "having_conditions": Conjunction { - "args": Array [], + "args": [], }, - "joins": Array [], + "joins": [], "limitbycolumns": undefined, "limits": undefined, - "order_expressions": Array [], - "params": Object {}, + "order_expressions": [], + "params": {}, "preconditions": Conjunction { - "args": Array [], + "args": [], }, "request_totals": undefined, "sampling": undefined, - "select_list": Array [ + "select_list": [ "fingerprint", ], - "tables": Array [ - Array [ + "tables": [ + [ Term { "term": "loki.time_series_gin", }, ], ], - "withs": Object {}, + "withs": {}, }, }, Term { @@ -12857,7 +12857,7 @@ Select { }, ], ], - "withs": Object {}, + "withs": {}, }, }, }, @@ -12867,83 +12867,83 @@ Select { exports[`should transpile log_stream_selector with stream filter 8`] = `"WITH idx_sel AS (select \`sel_1\`.\`fingerprint\` from (select \`fingerprint\` from \`loki\`.\`time_series_gin\` where ((\`key\` = 'rerum_laborum') and (match(val, '^con.+q.at[a-z]r') = 0))) as \`sel_1\`) select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\` from loki.samples_vX as \`samples\` where ((\`samples\`.\`timestamp_ns\` between 1 and 2) and (\`samples\`.\`type\` in (0,0))) and (samples.fingerprint IN idx_sel) and (match(string, 'cons[eE][^ ]+r nam soluta') = 0) order by \`timestamp_ns\` desc limit 3"`; exports[`should transpile logfmt requests 1`] = ` -Array [ - Object { - "labels": Object { +[ + { + "labels": { "autem_quis": "quidem sit", "l1": "v3", "l2": "v2", "l3": "v4", }, - "string": "l1=\\"v3\\" l3=\\"v4\\" ", + "string": "l1=\"v3\" l3=\"v4\" ", }, ] `; exports[`should transpile new style 1 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.7387779420506657'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\` from loki.samples_vX as \`samples\` where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` desc limit 2000) select JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\`,sel_a.* from sel_a left any join \`loki\`.\`time_series\` AS time_series on \`sel_a\`.\`fingerprint\` = time_series.fingerprint order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 2 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.2119268970232')) and ((JSONHas(labels, 'freq') = 1) and (JSONExtractString(labels, 'freq') = '2'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\` from loki.samples_vX as \`samples\` where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) and (match(string, '2[0-9]$') = 1) order by \`timestamp_ns\` desc limit 2000) select JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\`,sel_a.* from sel_a left any join \`loki\`.\`time_series\` AS time_series on \`sel_a\`.\`fingerprint\` = time_series.fingerprint order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 3 1`] = ` -Object { +{ "duration": 1000, "matrix": true, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.7026038163617259')) and ((JSONHas(labels, 'freq') = 1) and (JSONExtractString(labels, 'freq') = '2'))), rate_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,intDiv(samples.timestamp_ns, 1000000) as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) and (match(string, '2[0-9]$') = 1) order by \`timestamp_ns\` desc), rate_b AS (select labels as \`labels\`,intDiv(timestamp_ns, 1000) * 1000 as \`timestamp_ns\`,toFloat64(count(1)) * 1000 / 1000 as \`value\` from rate_a group by \`labels\`,\`timestamp_ns\` order by \`labels\` asc,\`timestamp_ns\` asc) select \`labels\`,intDiv(timestamp_ns, 2000) * 2000 as \`timestamp_ns\`,argMin(rate_b.value, rate_b.timestamp_ns) as \`value\` from \`rate_b\` group by \`labels\`,\`timestamp_ns\` order by \`labels\` asc,\`timestamp_ns\` asc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 4 1`] = ` -Object { +{ "duration": 1000, "matrix": true, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.7026038163617259')) and ((JSONHas(labels, 'freq') = 1) and (JSONExtractString(labels, 'freq') = '2'))) select \`labels\`,toUInt64(intDiv(timestamp_ns, 1000000000) * 1000) as \`timestamp_ns\`,toFloat64(0) as \`value\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) and (match(string, '2[0-9]$') = 1) group by \`labels\`,\`timestamp_ns\` order by \`labels\` asc,\`timestamp_ns\` asc", - "stream": Array [ + "stream": [ [Function], ], } `; exports[`should transpile new style 5 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.000341166036469831_json'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` desc limit 2000) select * from sel_a order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [ + "stream": [ [Function], ], } `; exports[`should transpile new style 6 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.2053747382122484_json'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\`,arrayFilter((x) -> x.2 != '', [('lbl_repl', if(JSONType(samples.string, 'new_lbl') == 'String', JSONExtractString(samples.string, 'new_lbl'), JSONExtractRaw(samples.string, 'new_lbl')))]) as \`extra_labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) and (isValidJSON(samples.string) = 1) and ((indexOf(extra_labels, ('lbl_repl', 'new_val')) > 0) or ((arrayExists(x -> x.1 == 'lbl_repl', extra_labels) = 0) and ((arrayExists(x -> x.1 == 'lbl_repl', labels) = 1) and (arrayFirst(x -> x.1 == 'lbl_repl', labels).2 = 'new_val')))) order by \`timestamp_ns\` desc limit 2000) select * from sel_a order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 7 1`] = ` -Object { +{ "duration": 3000, "matrix": true, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.1547558751138609_json'))) select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,intDiv(samples.timestamp_ns, 1000000) as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` desc", - "stream": Array [ + "stream": [ [Function], [Function], [Function], @@ -12955,11 +12955,11 @@ Object { `; exports[`should transpile new style 8 1`] = ` -Object { +{ "duration": 1000, "matrix": true, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.4075242197275857'))) select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,intDiv(samples.timestamp_ns, 1000000) as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` desc", - "stream": Array [ + "stream": [ [Function], [Function], [Function], @@ -12971,38 +12971,38 @@ Object { `; exports[`should transpile new style 9 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.7186063017626447_json'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\`,arrayFilter((x) -> x.2 != '', [('sid', if(JSONType(samples.string, 'str_id') == 'String', JSONExtractString(samples.string, 'str_id'), JSONExtractRaw(samples.string, 'str_id')))]) as \`extra_labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) and (isValidJSON(samples.string) = 1) and ((arrayExists(x -> x.1 == 'sid' AND (coalesce(toFloat64OrNull(x.2) >= '598', 0)), extra_labels) != 0) or ((arrayExists(x -> x.1 == 'sid', extra_labels) = 0) and (arrayExists(x -> x.1 == 'sid', labels) = 1) and (toFloat64OrNull(arrayFirst(x -> x.1 == 'sid', labels).2) >= '598'))) order by \`timestamp_ns\` desc limit 2000) select * from sel_a order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 10 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (JSONExtractString(labels, 'test_id') = '0.5505504081219323'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\`,arrayFilter(x -> x.1 != '' AND x.2 != '', arrayZip(['e'], arrayMap(x -> x[length(x)], extractAllGroupsHorizontal(string, '^([^0-9]+)[0-9]+$')))) as \`extra_labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` desc limit 2000) select * from sel_a order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 11 1`] = ` -Object { +{ "duration": 1000, "matrix": true, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'label') = 1) and (JSONExtractString(labels, 'label') = 'val'))), uw_rate_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,intDiv(samples.timestamp_ns, 1000000) as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\`,toFloat64OrNull(arrayFirst(x -> x.1 == 'b', labels).2) as \`unwrapped\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) and ((arrayExists(x -> x.1 == 'b', labels) = 1) and (isNotNull(unwrapped) = 1)) order by \`timestamp_ns\` desc), uw_rate_b AS (select labels as \`labels\`,SUM(unwrapped) / 1 as \`value\`,intDiv(timestamp_ns, 1000) * 1000 as \`timestamp_ns\` from uw_rate_a group by \`labels\`,\`timestamp_ns\` order by \`labels\`,\`timestamp_ns\`) select \`labels\`,intDiv(timestamp_ns, 2000) * 2000 as \`timestamp_ns\`,argMin(uw_rate_b.value, uw_rate_b.timestamp_ns) as \`value\` from uw_rate_b group by \`labels\`,\`timestamp_ns\` order by \`labels\` asc,\`timestamp_ns\` asc", - "stream": Array [], + "stream": [], } `; exports[`should transpile new style 12 1`] = ` -Object { +{ "duration": 1000, "matrix": false, "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'freq') = 1) and (JSONExtractString(labels, 'freq') = '1'))), sel_a AS (select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_vX as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` between 1638802620000000000 and 1638803220000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` desc limit 2000) select * from sel_a order by \`labels\` desc,\`timestamp_ns\` desc", - "stream": Array [ + "stream": [ [Function], [Function], ], @@ -13010,15 +13010,15 @@ Object { `; exports[`should transpile plugins 1`] = ` -Array [ - Object { - "labels": Object { +[ + { + "labels": { "lbl1": "a", }, "timestamp_ns": "0", "value": 10, }, - Object { + { "EOF": true, }, ] @@ -13027,8 +13027,8 @@ Array [ exports[`should transpile series 1`] = `"WITH idx_sel AS ((select \`sel_1\`.\`fingerprint\` from (select \`fingerprint\` from \`loki\`.\`time_series_gin\` where ((\`key\` = 'test_id') and (\`val\` = '123'))) as \`sel_1\`)) select DISTINCT \`fingerprint\`,\`labels\` from loki.time_series where (\`fingerprint\` in (idx_sel)) and (1 == 1)"`; exports[`should transpile tail 1`] = ` -Object { +{ "query": "WITH str_sel AS (select DISTINCT \`fingerprint\` from loki.time_series where ((JSONHas(labels, 'test_id') = 1) and (extractAllGroups(JSONExtractString(labels, 'test_id'), '(_ws)') != '[]'))) select \`samples\`.\`string\` as \`string\`,\`samples\`.\`fingerprint\` as \`fingerprint\`,samples.timestamp_ns as \`timestamp_ns\`,JSONExtractKeysAndValues(time_series.labels, 'String') as \`labels\` from loki.samples_v3 as \`samples\` left any join \`loki\`.\`time_series\` AS time_series on \`samples\`.\`fingerprint\` = time_series.fingerprint where ((\`samples\`.\`timestamp_ns\` > (toUnixTimestamp(now()) - 5) * 1000000000) and (\`samples\`.\`type\` in (0,0))) and (\`samples\`.\`fingerprint\` in (select \`fingerprint\` from str_sel)) order by \`timestamp_ns\` asc", - "stream": Array [], + "stream": [], } `;