Skip to content

Commit

Permalink
add error handling to stats query parser antlr (#1429)
Browse files Browse the repository at this point in the history
Signed-off-by: Paul Sebastian <[email protected]>
  • Loading branch information
paulstn authored Feb 13, 2024
1 parent 1211e83 commit 50fe732
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 50fe732

Please sign in to comment.