From 03d691e51cff80d9d0143fe3645e2f1c0bc1a8cf Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 10 Feb 2026 22:53:52 +0000 Subject: [PATCH 1/6] Fix fallback error handling to show original Calcite error When Calcite falls back to V2 and V2 also fails, now correctly returns the original Calcite error instead of V2's generic "only supported when calcite enabled" message, improving error clarity for users. Fixes #5060. Co-Authored-By: Claude Signed-off-by: Simeon Widdis --- .../opensearch/sql/executor/QueryService.java | 18 +++--- .../sql/executor/QueryServiceTest.java | 61 +++++++++++++++++++ 2 files changed, 69 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/executor/QueryService.java b/core/src/main/java/org/opensearch/sql/executor/QueryService.java index b2c219b0e4..4c612b7c76 100644 --- a/core/src/main/java/org/opensearch/sql/executor/QueryService.java +++ b/core/src/main/java/org/opensearch/sql/executor/QueryService.java @@ -174,11 +174,10 @@ public void executeWithLegacy( try { executePlan(analyze(plan, queryType), PlanContext.emptyPlanContext(), listener); } catch (Exception e) { - if (shouldUseCalcite(queryType) && isCalciteFallbackAllowed(null)) { - // if there is a failure thrown from Calcite and execution after fallback V2 - // keeps failure, we should throw the failure from Calcite. - calciteFailure.ifPresentOrElse( - t -> listener.onFailure(new RuntimeException(t)), () -> listener.onFailure(e)); + // if there is a failure thrown from Calcite and execution after fallback V2 + // keeps failure, we should throw the failure from Calcite. + if (calciteFailure.isPresent()) { + listener.onFailure(new RuntimeException(calciteFailure.get())); } else { listener.onFailure(e); } @@ -207,11 +206,10 @@ public void explainWithLegacy( } executionEngine.explain(plan(analyze(plan, queryType)), listener); } catch (Exception e) { - if (shouldUseCalcite(queryType) && isCalciteFallbackAllowed(null)) { - // if there is a failure thrown from Calcite and execution after fallback V2 - // keeps failure, we should throw the failure from Calcite. - calciteFailure.ifPresentOrElse( - t -> listener.onFailure(new RuntimeException(t)), () -> listener.onFailure(e)); + // if there is a failure thrown from Calcite and execution after fallback V2 + // keeps failure, we should throw the failure from Calcite. + if (calciteFailure.isPresent()) { + listener.onFailure(new RuntimeException(calciteFailure.get())); } else { listener.onFailure(e); } diff --git a/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java b/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java index 0ee97754c6..7e44cc806b 100644 --- a/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java +++ b/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java @@ -91,6 +91,67 @@ public void analyzeExceptionShouldBeCached() { queryService().analyzeFail().handledByOnFailure(); } + @Test + public void testExecuteWithLegacyShouldReturnCalciteErrorWhenBothFail() { + UnsupportedOperationException calciteException = + new UnsupportedOperationException("Calcite error"); + IllegalStateException v2Exception = new IllegalStateException("V2 error"); + + ResponseListener responseListener = + new ResponseListener<>() { + @Override + public void onResponse(ExecutionEngine.QueryResponse pplQueryResponse) { + fail("Expected onFailure to be called"); + } + + @Override + public void onFailure(Exception e) { + // Should get the Calcite error wrapped in RuntimeException, not the V2 error + assertNotNull(e); + assertTrue(e instanceof RuntimeException); + assertTrue(e.getCause() instanceof UnsupportedOperationException); + assertTrue(e.getCause().getMessage().contains("Calcite error")); + } + }; + + lenient().when(settings.getSettingValue(Key.CALCITE_ENGINE_ENABLED)).thenReturn(false); + lenient().when(analyzer.analyze(any(), any())).thenThrow(v2Exception); + + QueryService service = new QueryService(analyzer, executionEngine, planner, null, settings); + service.executeWithLegacy(ast, queryType, responseListener, Optional.of(calciteException)); + } + + @Test + public void testExplainWithLegacyShouldReturnCalciteErrorWhenBothFail() { + UnsupportedOperationException calciteException = + new UnsupportedOperationException("Calcite error"); + IllegalStateException v2Exception = new IllegalStateException("V2 error"); + + ResponseListener responseListener = + new ResponseListener<>() { + @Override + public void onResponse(ExecutionEngine.ExplainResponse explainResponse) { + fail("Expected onFailure to be called"); + } + + @Override + public void onFailure(Exception e) { + // Should get the Calcite error wrapped in RuntimeException, not the V2 error + assertNotNull(e); + assertTrue(e instanceof RuntimeException); + assertTrue(e.getCause() instanceof UnsupportedOperationException); + assertTrue(e.getCause().getMessage().contains("Calcite error")); + } + }; + + lenient().when(settings.getSettingValue(Key.CALCITE_ENGINE_ENABLED)).thenReturn(false); + lenient().when(analyzer.analyze(any(), any())).thenThrow(v2Exception); + + QueryService service = new QueryService(analyzer, executionEngine, planner, null, settings); + service.explainWithLegacy( + ast, queryType, responseListener, ExplainMode.STANDARD, Optional.of(calciteException)); + } + Helper queryService() { return new Helper(); } From 2ada127117ef2b1a57e49d021043bc43cd881edf Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Tue, 10 Feb 2026 23:18:02 +0000 Subject: [PATCH 2/6] coderabbit: preserve exception types Signed-off-by: Simeon Widdis --- .../opensearch/sql/executor/QueryService.java | 16 +++- .../sql/executor/QueryServiceTest.java | 73 +++++++++++++++++-- 2 files changed, 79 insertions(+), 10 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/executor/QueryService.java b/core/src/main/java/org/opensearch/sql/executor/QueryService.java index 4c612b7c76..3bf226cedb 100644 --- a/core/src/main/java/org/opensearch/sql/executor/QueryService.java +++ b/core/src/main/java/org/opensearch/sql/executor/QueryService.java @@ -177,7 +177,13 @@ public void executeWithLegacy( // if there is a failure thrown from Calcite and execution after fallback V2 // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { - listener.onFailure(new RuntimeException(calciteFailure.get())); + Throwable t = calciteFailure.get(); + // Pass through Exceptions directly, wrap Errors in CalciteUnsupportedException + // to match the error handling pattern in executeWithCalcite + listener.onFailure( + t instanceof Exception + ? (Exception) t + : new CalciteUnsupportedException(t.getMessage(), t)); } else { listener.onFailure(e); } @@ -209,7 +215,13 @@ public void explainWithLegacy( // if there is a failure thrown from Calcite and execution after fallback V2 // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { - listener.onFailure(new RuntimeException(calciteFailure.get())); + Throwable t = calciteFailure.get(); + // Pass through Exceptions directly, wrap Errors in CalciteUnsupportedException + // to match the error handling pattern in explainWithCalcite + listener.onFailure( + t instanceof Exception + ? (Exception) t + : new CalciteUnsupportedException(t.getMessage(), t)); } else { listener.onFailure(e); } diff --git a/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java b/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java index 7e44cc806b..e7db5797a5 100644 --- a/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java +++ b/core/src/test/java/org/opensearch/sql/executor/QueryServiceTest.java @@ -106,11 +106,10 @@ public void onResponse(ExecutionEngine.QueryResponse pplQueryResponse) { @Override public void onFailure(Exception e) { - // Should get the Calcite error wrapped in RuntimeException, not the V2 error + // Should get the Calcite error directly (not wrapped), not the V2 error assertNotNull(e); - assertTrue(e instanceof RuntimeException); - assertTrue(e.getCause() instanceof UnsupportedOperationException); - assertTrue(e.getCause().getMessage().contains("Calcite error")); + assertTrue(e instanceof UnsupportedOperationException); + assertTrue(e.getMessage().contains("Calcite error")); } }; @@ -136,11 +135,10 @@ public void onResponse(ExecutionEngine.ExplainResponse explainResponse) { @Override public void onFailure(Exception e) { - // Should get the Calcite error wrapped in RuntimeException, not the V2 error + // Should get the Calcite error directly (not wrapped), not the V2 error assertNotNull(e); - assertTrue(e instanceof RuntimeException); - assertTrue(e.getCause() instanceof UnsupportedOperationException); - assertTrue(e.getCause().getMessage().contains("Calcite error")); + assertTrue(e instanceof UnsupportedOperationException); + assertTrue(e.getMessage().contains("Calcite error")); } }; @@ -152,6 +150,65 @@ public void onFailure(Exception e) { ast, queryType, responseListener, ExplainMode.STANDARD, Optional.of(calciteException)); } + @Test + public void testExecuteWithLegacyShouldWrapCalciteErrorInCalciteUnsupportedException() { + AssertionError calciteError = new AssertionError("Calcite assertion failed"); + IllegalStateException v2Exception = new IllegalStateException("V2 error"); + + ResponseListener responseListener = + new ResponseListener<>() { + @Override + public void onResponse(ExecutionEngine.QueryResponse pplQueryResponse) { + fail("Expected onFailure to be called"); + } + + @Override + public void onFailure(Exception e) { + // Errors should be wrapped in CalciteUnsupportedException + assertNotNull(e); + assertTrue(e instanceof org.opensearch.sql.exception.CalciteUnsupportedException); + assertTrue(e.getCause() instanceof AssertionError); + assertTrue(e.getMessage().contains("Calcite assertion failed")); + } + }; + + lenient().when(settings.getSettingValue(Key.CALCITE_ENGINE_ENABLED)).thenReturn(false); + lenient().when(analyzer.analyze(any(), any())).thenThrow(v2Exception); + + QueryService service = new QueryService(analyzer, executionEngine, planner, null, settings); + service.executeWithLegacy(ast, queryType, responseListener, Optional.of(calciteError)); + } + + @Test + public void testExplainWithLegacyShouldWrapCalciteErrorInCalciteUnsupportedException() { + AssertionError calciteError = new AssertionError("Calcite assertion failed"); + IllegalStateException v2Exception = new IllegalStateException("V2 error"); + + ResponseListener responseListener = + new ResponseListener<>() { + @Override + public void onResponse(ExecutionEngine.ExplainResponse explainResponse) { + fail("Expected onFailure to be called"); + } + + @Override + public void onFailure(Exception e) { + // Errors should be wrapped in CalciteUnsupportedException + assertNotNull(e); + assertTrue(e instanceof org.opensearch.sql.exception.CalciteUnsupportedException); + assertTrue(e.getCause() instanceof AssertionError); + assertTrue(e.getMessage().contains("Calcite assertion failed")); + } + }; + + lenient().when(settings.getSettingValue(Key.CALCITE_ENGINE_ENABLED)).thenReturn(false); + lenient().when(analyzer.analyze(any(), any())).thenThrow(v2Exception); + + QueryService service = new QueryService(analyzer, executionEngine, planner, null, settings); + service.explainWithLegacy( + ast, queryType, responseListener, ExplainMode.STANDARD, Optional.of(calciteError)); + } + Helper queryService() { return new Helper(); } From 244f27bc0648be0c1455852174cc45cc86381f75 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 11 Feb 2026 17:51:43 +0000 Subject: [PATCH 3/6] Refactoring for coderabbit: consistent handling of calcite and legacy calcite errors Signed-off-by: Simeon Widdis --- .../opensearch/sql/executor/QueryService.java | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/executor/QueryService.java b/core/src/main/java/org/opensearch/sql/executor/QueryService.java index 3bf226cedb..ecc5fc2cda 100644 --- a/core/src/main/java/org/opensearch/sql/executor/QueryService.java +++ b/core/src/main/java/org/opensearch/sql/executor/QueryService.java @@ -64,6 +64,36 @@ public class QueryService { @Getter(lazy = true) private final CalciteRelNodeVisitor relNodeVisitor = new CalciteRelNodeVisitor(dataSourceService); + /** Helper: depending on the type of error, either re-raise or propagate to the listener. */ + private void propagateCalciteError( + Throwable t, ResponseListener listener) + throws VirtualMachineError { + if (t instanceof Exception) { + listener.onFailure((Exception) t); + } else if (t instanceof ExceptionInInitializerError + && ((ExceptionInInitializerError) t).getException() instanceof Exception) { + listener.onFailure((Exception) ((ExceptionInInitializerError) t).getException()); + } else if (t instanceof VirtualMachineError) { + // throw and fast fail the VM errors such as OOM (same with v2). + throw (VirtualMachineError) t; + } else { + // Calcite may throw AssertError during query execution. + listener.onFailure(new CalciteUnsupportedException(t.getMessage(), t)); + } + } + + /** Helper: depending on the type of error, either re-raise or propagate to the listener. */ + private void propagateCalciteExplainError( + Throwable t, ResponseListener listener) + throws VirtualMachineError { + if (t instanceof Error) { + // Calcite may throw AssertError during query execution. + listener.onFailure(new CalciteUnsupportedException(t.getMessage(), t)); + } else { + listener.onFailure((Exception) t); + } + } + /** Execute the {@link UnresolvedPlan}, using {@link ResponseListener} to get response.
*/ public void execute( UnresolvedPlan plan, @@ -112,18 +142,7 @@ public void executeWithCalcite( log.warn("Fallback to V2 query engine since got exception", t); executeWithLegacy(plan, queryType, listener, Optional.of(t)); } else { - if (t instanceof Exception) { - listener.onFailure((Exception) t); - } else if (t instanceof ExceptionInInitializerError - && ((ExceptionInInitializerError) t).getException() instanceof Exception) { - listener.onFailure((Exception) ((ExceptionInInitializerError) t).getException()); - } else if (t instanceof VirtualMachineError) { - // throw and fast fail the VM errors such as OOM (same with v2). - throw t; - } else { - // Calcite may throw AssertError during query execution. - listener.onFailure(new CalciteUnsupportedException(t.getMessage(), t)); - } + propagateCalciteError(t, listener); } } }, @@ -154,12 +173,7 @@ public void explainWithCalcite( log.warn("Fallback to V2 query engine since got exception", t); explainWithLegacy(plan, queryType, listener, mode, Optional.of(t)); } else { - if (t instanceof Error) { - // Calcite may throw AssertError during query execution. - listener.onFailure(new CalciteUnsupportedException(t.getMessage(), t)); - } else { - listener.onFailure((Exception) t); - } + propagateCalciteExplainError(t, listener); } } }, @@ -177,13 +191,7 @@ public void executeWithLegacy( // if there is a failure thrown from Calcite and execution after fallback V2 // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { - Throwable t = calciteFailure.get(); - // Pass through Exceptions directly, wrap Errors in CalciteUnsupportedException - // to match the error handling pattern in executeWithCalcite - listener.onFailure( - t instanceof Exception - ? (Exception) t - : new CalciteUnsupportedException(t.getMessage(), t)); + propagateCalciteError(calciteFailure.get(), listener); } else { listener.onFailure(e); } @@ -215,13 +223,7 @@ public void explainWithLegacy( // if there is a failure thrown from Calcite and execution after fallback V2 // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { - Throwable t = calciteFailure.get(); - // Pass through Exceptions directly, wrap Errors in CalciteUnsupportedException - // to match the error handling pattern in explainWithCalcite - listener.onFailure( - t instanceof Exception - ? (Exception) t - : new CalciteUnsupportedException(t.getMessage(), t)); + propagateCalciteExplainError(calciteFailure.get(), listener); } else { listener.onFailure(e); } From 3596379813b83e1006b4e147d2b4b7ff8b1a8ac4 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 11 Feb 2026 18:33:35 +0000 Subject: [PATCH 4/6] Update explain error handling to match non-explain Signed-off-by: Simeon Widdis --- .../opensearch/sql/executor/QueryService.java | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/executor/QueryService.java b/core/src/main/java/org/opensearch/sql/executor/QueryService.java index ecc5fc2cda..d8a7266005 100644 --- a/core/src/main/java/org/opensearch/sql/executor/QueryService.java +++ b/core/src/main/java/org/opensearch/sql/executor/QueryService.java @@ -65,8 +65,7 @@ public class QueryService { private final CalciteRelNodeVisitor relNodeVisitor = new CalciteRelNodeVisitor(dataSourceService); /** Helper: depending on the type of error, either re-raise or propagate to the listener. */ - private void propagateCalciteError( - Throwable t, ResponseListener listener) + private void propagateCalciteError(Throwable t, ResponseListener listener) throws VirtualMachineError { if (t instanceof Exception) { listener.onFailure((Exception) t); @@ -82,18 +81,6 @@ private void propagateCalciteError( } } - /** Helper: depending on the type of error, either re-raise or propagate to the listener. */ - private void propagateCalciteExplainError( - Throwable t, ResponseListener listener) - throws VirtualMachineError { - if (t instanceof Error) { - // Calcite may throw AssertError during query execution. - listener.onFailure(new CalciteUnsupportedException(t.getMessage(), t)); - } else { - listener.onFailure((Exception) t); - } - } - /** Execute the {@link UnresolvedPlan}, using {@link ResponseListener} to get response.
*/ public void execute( UnresolvedPlan plan, @@ -173,7 +160,7 @@ public void explainWithCalcite( log.warn("Fallback to V2 query engine since got exception", t); explainWithLegacy(plan, queryType, listener, mode, Optional.of(t)); } else { - propagateCalciteExplainError(t, listener); + propagateCalciteError(t, listener); } } }, @@ -223,7 +210,7 @@ public void explainWithLegacy( // if there is a failure thrown from Calcite and execution after fallback V2 // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { - propagateCalciteExplainError(calciteFailure.get(), listener); + propagateCalciteError(calciteFailure.get(), listener); } else { listener.onFailure(e); } From 114c15249faf672847da41f57ce37dfb6f1699e6 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Wed, 11 Feb 2026 18:51:47 +0000 Subject: [PATCH 5/6] Minor tweaks: commenting & eval order Signed-off-by: Simeon Widdis --- .../opensearch/sql/executor/QueryService.java | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/core/src/main/java/org/opensearch/sql/executor/QueryService.java b/core/src/main/java/org/opensearch/sql/executor/QueryService.java index d8a7266005..ed986c6d77 100644 --- a/core/src/main/java/org/opensearch/sql/executor/QueryService.java +++ b/core/src/main/java/org/opensearch/sql/executor/QueryService.java @@ -67,14 +67,15 @@ public class QueryService { /** Helper: depending on the type of error, either re-raise or propagate to the listener. */ private void propagateCalciteError(Throwable t, ResponseListener listener) throws VirtualMachineError { + if (t instanceof VirtualMachineError) { + // throw and fast fail the VM errors such as OOM (same with v2). + throw (VirtualMachineError) t; + } if (t instanceof Exception) { listener.onFailure((Exception) t); } else if (t instanceof ExceptionInInitializerError && ((ExceptionInInitializerError) t).getException() instanceof Exception) { listener.onFailure((Exception) ((ExceptionInInitializerError) t).getException()); - } else if (t instanceof VirtualMachineError) { - // throw and fast fail the VM errors such as OOM (same with v2). - throw (VirtualMachineError) t; } else { // Calcite may throw AssertError during query execution. listener.onFailure(new CalciteUnsupportedException(t.getMessage(), t)); @@ -175,9 +176,10 @@ public void executeWithLegacy( try { executePlan(analyze(plan, queryType), PlanContext.emptyPlanContext(), listener); } catch (Exception e) { - // if there is a failure thrown from Calcite and execution after fallback V2 - // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { + // This happens if Calcite fell back to V2 due to some issue, and then V2 also failed. + // Prefer the Calcite error. + // https://github.com/opensearch-project/sql/issues/5060 propagateCalciteError(calciteFailure.get(), listener); } else { listener.onFailure(e); @@ -207,9 +209,10 @@ public void explainWithLegacy( } executionEngine.explain(plan(analyze(plan, queryType)), listener); } catch (Exception e) { - // if there is a failure thrown from Calcite and execution after fallback V2 - // keeps failure, we should throw the failure from Calcite. if (calciteFailure.isPresent()) { + // This happens if Calcite fell back to V2 due to some issue, and then V2 also failed. + // Prefer the Calcite error. + // https://github.com/opensearch-project/sql/issues/5060 propagateCalciteError(calciteFailure.get(), listener); } else { listener.onFailure(e); From e81cf26988afc35de1a5d60ba73a41fc11c36201 Mon Sep 17 00:00:00 2001 From: Simeon Widdis Date: Thu, 12 Feb 2026 18:22:28 +0000 Subject: [PATCH 6/6] Add a yaml test Signed-off-by: Simeon Widdis --- .../rest-api-spec/test/issues/5060.yml | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/5060.yml diff --git a/integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/5060.yml b/integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/5060.yml new file mode 100644 index 0000000000..87932a07a1 --- /dev/null +++ b/integ-test/src/yamlRestTest/resources/rest-api-spec/test/issues/5060.yml @@ -0,0 +1,66 @@ +# Issue: https://github.com/opensearch-project/sql/issues/5060 +# PR: https://github.com/opensearch-project/sql/pull/5133 +# When Calcite falls back to V2 and V2 also fails, return the original Calcite error instead of V2's. +# +# The AD command forces a V2 fallback, then join is only supported in V3 (Calcite). +# This test verifies that when both Calcite and V2 fail, the error message correctly shows +# the Calcite error (CalciteUnsupportedException) rather than the V2 error. + +setup: + - do: + query.settings: + body: + transient: + plugins.calcite.enabled: true + - do: + indices.create: + index: test_join_ad_error_5133 + body: + mappings: + properties: + "event.id": + type: keyword + "@timestamp": + type: date + message: + type: text + - do: + bulk: + index: test_join_ad_error_5133 + refresh: true + body: + - '{"index": {}}' + - '{"event.id": "evt1", "@timestamp": "2025-01-15T10:30:00Z", "message": "test message 1"}' + - '{"index": {}}' + - '{"event.id": "evt2", "@timestamp": "2025-01-15T10:31:00Z", "message": "test message 2"}' + +--- +teardown: + - do: + query.settings: + body: + transient: + plugins.calcite.enabled: false + - do: + indices.delete: + index: test_join_ad_error_5133 + +--- +"Join with AD command should return Calcite error when both Calcite and V2 fail": + - skip: + features: + - headers + - allowed_warnings + # Before the fix: Returns V2 error "Join is supported only when plugins.calcite.enabled=true" (status 500) + # After the fix: Returns Calcite error "AD command is unsupported in Calcite" (status 400) + - do: + allowed_warnings: + - 'Loading the fielddata on the _id field is deprecated and will be removed in future versions. If you require sorting or aggregating on this field you should also include the id in the body of your documents, and map this field as a keyword field that has [doc_values] enabled' + catch: bad_request + headers: + Content-Type: 'application/json' + ppl: + body: + query: source=test_join_ad_error_5133 | join `event.id` [source = test_join_ad_error_5133] | ad time_field='@timestamp' + - match: { "$body": "/CalciteUnsupportedException/" } + - match: { "$body": "/AD\\s+command\\s+is\\s+unsupported\\s+in\\s+Calcite/" }