File tree Expand file tree Collapse file tree 2 files changed +11
-6
lines changed
main/java/org/elasticsearch/xpack/esql/plan/logical/promql
test/java/org/elasticsearch/xpack/esql/analysis/promql Expand file tree Collapse file tree 2 files changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,9 @@ public void postAnalysisVerification(Failures failures) {
151151 failures .add (fail (s , "offset modifiers are not supported at this time [{}]" , s .sourceText ()));
152152 }
153153 }
154+ if (lp instanceof Subquery ) {
155+ failures .add (fail (lp , "subqueries are not supported at this time [{}]" , lp .sourceText ()));
156+ }
154157 if (step () != null && lp instanceof RangeSelector rs ) {
155158 Duration rangeDuration = (Duration ) rs .range ().fold (null );
156159 if (rangeDuration .equals (step ()) == false ) {
Original file line number Diff line number Diff line change @@ -49,13 +49,15 @@ public void testPromqlIllegalNameLabelMatcher() {
4949 );
5050 }
5151
52- @ Ignore
5352 public void testPromqlSubquery () {
54- // TODO doesn't parse
55- // line 1:36: Invalid query 'network.bytes_in'[ValueExpressionContext] given; expected Expression but found
56- // InstantSelector
57- assertThat (error ("TS test | PROMQL step 5m (avg(rate(network.bytes_in[5m:])))" , tsdb ), equalTo ("" ));
58- assertThat (error ("TS test | PROMQL step 5m (avg(rate(network.bytes_in[5m:1m])))" , tsdb ), equalTo ("" ));
53+ assertThat (
54+ error ("TS test | PROMQL step 5m (avg(rate(network.bytes_in[5m:])))" , tsdb ),
55+ equalTo ("1:36: subqueries are not supported at this time [network.bytes_in[5m:]]" )
56+ );
57+ assertThat (
58+ error ("TS test | PROMQL step 5m (avg(rate(network.bytes_in[5m:1m])))" , tsdb ),
59+ equalTo ("1:36: subqueries are not supported at this time [network.bytes_in[5m:1m]]" )
60+ );
5961 }
6062
6163 @ Ignore
You can’t perform that action at this time.
0 commit comments