Commit 4d5adf56 authored by Lucas Fernandes de Oliveira's avatar Lucas Fernandes de Oliveira

Merge branch 'issue/45' into 'master'

Issue #45: Fix config parser key reading and view ids

See merge request !35
parents 1c178bda c1adf8c0
Pipeline #12149 passed with stage
in 45 seconds
......@@ -465,11 +465,19 @@ export class PostgresAdapter extends Adapter {
clauses: partial0.clauses.concat(partial1.clauses),
materialized: false
});
const id = new View({
metrics: mets.concat(dimMetrics),
dimensions: dims,
keys: keys,
origin: false,
clauses: partial0.clauses.concat(partial1.clauses),
materialized: false
}).id;
const viewFrom = "(" +
this.buildQuery(partial, [partial0, partial1]) +
") AS view_" + partial0.id + partial1.id + "\n";
") AS view_" + id + "\n";
partialJoin.push({
id: partial0.id + partial1.id,
id: id,
from: viewFrom,
dimMetrics: dimMetrics,
metrics: mets,
......
......@@ -185,7 +185,7 @@ export class ConfigParser {
for (let i = 0; i < keys.length; ++i) {
if (dimMap[keys[i]]) {
viewOpt.keys.push(dimMap[opts.dimensions[i]]);
viewOpt.keys.push(dimMap[opts.keys[i]]);
}
else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment