This is an automated email from the ASF dual-hosted git repository. wankai pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/skywalking.git
The following commit(s) were added to refs/heads/master by this push: new 13bb3f62a6 Fix not throw error when part of expression not matched any expression node in the `MQE` and `PromQL. (#12093) 13bb3f62a6 is described below commit 13bb3f62a6ff809c148dbeb3f2a9575fbcd71f17 Author: Wan Kai <wankai...@foxmail.com> AuthorDate: Thu Apr 11 22:50:55 2024 +0800 Fix not throw error when part of expression not matched any expression node in the `MQE` and `PromQL. (#12093) --- docs/en/changes/changes.md | 1 + .../src/main/antlr4/org/apache/skywalking/mqe/rt/grammar/MQEParser.g4 | 2 +- .../main/antlr4/org/apache/skywalking/promql/rt/grammar/PromQLParser.g4 | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/en/changes/changes.md b/docs/en/changes/changes.md index 40aafacbe4..2cd81f4aea 100644 --- a/docs/en/changes/changes.md +++ b/docs/en/changes/changes.md @@ -96,6 +96,7 @@ * Bump up Kafka to fix CVE. * Fix `NullPointerException` in Istio ServiceEntry registry. * Remove unnecessary `componentIds` as series ID in the `ServiceRelationClientSideMetrics` and `ServiceRelationServerSideMetrics` entities. +* Fix not throw error when part of expression not matched any expression node in the `MQE` and `PromQL. #### UI diff --git a/oap-server/mqe-grammar/src/main/antlr4/org/apache/skywalking/mqe/rt/grammar/MQEParser.g4 b/oap-server/mqe-grammar/src/main/antlr4/org/apache/skywalking/mqe/rt/grammar/MQEParser.g4 index b274621717..b8768392b8 100644 --- a/oap-server/mqe-grammar/src/main/antlr4/org/apache/skywalking/mqe/rt/grammar/MQEParser.g4 +++ b/oap-server/mqe-grammar/src/main/antlr4/org/apache/skywalking/mqe/rt/grammar/MQEParser.g4 @@ -20,7 +20,7 @@ parser grammar MQEParser; options { tokenVocab = MQELexer; } -root: expression; +root: expression EOF; expression : expressionNode # exprNode diff --git a/oap-server/server-query-plugin/promql-plugin/src/main/antlr4/org/apache/skywalking/promql/rt/grammar/PromQLParser.g4 b/oap-server/server-query-plugin/promql-plugin/src/main/antlr4/org/apache/skywalking/promql/rt/grammar/PromQLParser.g4 index 3d0abf8485..847e23aabd 100644 --- a/oap-server/server-query-plugin/promql-plugin/src/main/antlr4/org/apache/skywalking/promql/rt/grammar/PromQLParser.g4 +++ b/oap-server/server-query-plugin/promql-plugin/src/main/antlr4/org/apache/skywalking/promql/rt/grammar/PromQLParser.g4 @@ -20,7 +20,7 @@ parser grammar PromQLParser; options { tokenVocab = PromQLLexer; } -root: expression; +root: expression EOF; expression : expressionNode # exprNode