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

Signed-off-by: Lucas Fernandes de Oliveira's avatarLucas Fernandes de Oliveira <lfo14@inf.ufpr.br>
parent 1c178bda
Pipeline #12146 passed with stage
in 1 minute and 47 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