Skip to content

Commit c8eb1f2

Browse files
committed
[fix] filtering on algo column extraction
1 parent 7f0c172 commit c8eb1f2

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

src/hashing/utils.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ export function extractAlgoColumnsFromObject(
3131
}
3232

3333
let output: Config.CoreConfiguration['algorithm']['columns'] = {
34-
static: columnConfig.static.map((colName) => obj[colName]).filter(Boolean),
35-
process: columnConfig.process.map((colName) => obj[colName]).filter(Boolean),
36-
reference: columnConfig.reference.map((colName) => obj[colName]).filter(Boolean),
34+
static: columnConfig.static.map((colName) => obj[colName]),
35+
process: columnConfig.process.map((colName) => obj[colName]),
36+
reference: columnConfig.reference.map((colName) => obj[colName]),
3737
};
3838

3939
return output;

tests/hashing/utils.test.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,12 @@ describe("hashing::util", () => {
3535
reference: ['col_refa', 'col_refb'],
3636
},
3737
{},
38-
)).toEqual({ static: [], process: [], reference: [] });
38+
)).toEqual({
39+
static: [ undefined, undefined ],
40+
process: [ undefined, undefined ],
41+
reference: [ undefined, undefined ]
42+
});
43+
// TODO: come back and revisit this - the undefineds are needed by the NWS tests
3944

4045
expect(extractAlgoColumnsFromObject(
4146
{

0 commit comments

Comments
 (0)