Update extensions/ql-vscode/src/log-insights/join-order.ts

Co-authored-by: Andrew Eisenberg <aeisenberg@github.com>
This commit is contained in:
Dave Bartolomeo
2022-08-12 12:49:29 -04:00
committed by GitHub
parent eb2d00e999
commit de88d27057

View File

@@ -51,7 +51,7 @@ function getDependentPredicates(operations: string[]): I.List<string> {
const matches = r.exec(operation.trim());
return I.List(matches!)
.rest() // Skip the first group as it's just the entire string
.filter(x => !!x && !x.match('r[0-9]+|PRIMITIVE')) // Only keep the references to predicates.
.filter(x => !x?.match('r[0-9]+|PRIMITIVE')) // Only keep the references to predicates.
.flatMap(x => x.split(',')) // Group 2 in the INVOKE HIGHER_ORDER RELATION case is a comma-separated list of identifiers.
.filter(x => !!x); // Remove empty strings
});