Skip to content

Commit

Permalink
add error handling to stats query parser antlr (#1429) (#1434)
Browse files Browse the repository at this point in the history
(cherry picked from commit 50fe732)

Signed-off-by: Paul Sebastian <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent 5381cac commit 6345682
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion common/query_manager/query_parser/ppl_query_parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ export class PPLQueryParser {

getStats() {
this.visitor = new StatsAstBuilder();
return this.visitor.visitRoot(this.parser!.root()).getTokens();
let inter = null;
try {
inter = this.visitor.visitRoot(this.parser!.root()).getTokens();
} catch (e) {
console.error(e);
}
return inter;
}
}

0 comments on commit 6345682

Please sign in to comment.