diff --git a/core/src/main/java/org/polypheny/db/languages/LanguageManager.java b/core/src/main/java/org/polypheny/db/languages/LanguageManager.java index db81e96946..c93b8976e3 100644 --- a/core/src/main/java/org/polypheny/db/languages/LanguageManager.java +++ b/core/src/main/java/org/polypheny/db/languages/LanguageManager.java @@ -300,7 +300,12 @@ private List implementTranslatedQuery( Statement statemen if ( transaction.isAnalyze() ) { transaction.getQueryAnalyzer().attachStacktrace( e ); } - cancelTransaction( transaction, "Caught exception: " + e.getMessage() ); + if ( !(e instanceof DeadlockException) ) { + // we only log unexpected cases with stacktrace + log.warn( "Caught exception: ", e ); + } + + cancelTransaction( transaction, String.format( "Caught %s exception: %s", e.getClass().getSimpleName(), e.getMessage() ) ); return List.of( (ImplementationContext.ofError( e, translated, statement )) ); } } diff --git a/dbms/src/test/java/org/polypheny/db/polyalg/PolyAlgParsingTest.java b/dbms/src/test/java/org/polypheny/db/polyalg/PolyAlgParsingTest.java index 2f75621657..e69b906d64 100644 --- a/dbms/src/test/java/org/polypheny/db/polyalg/PolyAlgParsingTest.java +++ b/dbms/src/test/java/org/polypheny/db/polyalg/PolyAlgParsingTest.java @@ -41,7 +41,6 @@ import org.polypheny.db.algebra.logical.relational.LogicalRelProject; import org.polypheny.db.algebra.logical.relational.LogicalRelScan; import org.polypheny.db.algebra.logical.relational.LogicalRelSort; -import org.polypheny.db.algebra.metadata.CyclicMetadataException; import org.polypheny.db.algebra.polyalg.PolyAlgRegistry; import org.polypheny.db.algebra.polyalg.parser.PolyAlgParser; import org.polypheny.db.algebra.polyalg.parser.PolyAlgToAlgConverter; @@ -71,7 +70,6 @@ import org.polypheny.db.transaction.TransactionManager; import org.polypheny.db.transaction.TransactionManagerImpl; import org.polypheny.db.type.entity.PolyValue; -import org.polypheny.db.webui.UiTestingConfigPage; @SuppressWarnings("SqlNoDataSourceInspection") @@ -270,7 +268,8 @@ private static String executePolyAlg( String polyAlg, PlanType planType, QueryLa private static String getResultAsString( List executedContexts, DataModel dataModel ) { assertEquals( 1, executedContexts.size() ); ExecutedContext context = executedContexts.get( 0 ); - assertTrue( context.getException().isEmpty() || context.getException().get().getClass() == CyclicMetadataException.class, "Query resulted in an exception" ); + + assertTrue( context.getException().isEmpty(), "Query resulted in an exception" ); @NotNull ResultIterator iter = context.getIterator(); String tupleType = context.getImplementation().tupleType.toString(); List> rows = iter.getAllRowsAndClose();