Skip to content

Commit

Permalink
add error handling to stats query parser antlr (opensearch-project#1429
Browse files Browse the repository at this point in the history
…) (opensearch-project#1434)

(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>
(cherry picked from commit 6345682)
  • Loading branch information
opensearch-trigger-bot[bot] authored and A9 Swift Project User committed Feb 15, 2024
1 parent 78bc8cf commit 690f724
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions auto_sync_commit_metadata.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"last_github_commit": "5381cac8d69d340253c6293263d04d73403be23b",
"last_gitfarm_commit": "6308cfd210e8282ef506b196a126208f8ac30918"
"last_github_commit": "6345682064096259a8844b054659a9fc815a342d",
"last_gitfarm_commit": "6f0dfccde986d1b692c7bc337178cdbb4118dfba"
}
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 690f724

Please sign in to comment.