diff --git a/dbms/src/main/java/org/polypheny/db/ddl/DdlManagerImpl.java b/dbms/src/main/java/org/polypheny/db/ddl/DdlManagerImpl.java index 338d484a69..097643ab45 100644 --- a/dbms/src/main/java/org/polypheny/db/ddl/DdlManagerImpl.java +++ b/dbms/src/main/java/org/polypheny/db/ddl/DdlManagerImpl.java @@ -1879,10 +1879,14 @@ public void createMaterializedView( String viewName, long schemaId, AlgRoot algR private void checkModelLangCompatibility( QueryLanguage language, Long tableId ) { CatalogTable catalogTable = catalog.getTable( tableId ); if ( catalogTable.getNamespaceType() != language.getNamespaceType() ) { - throw new RuntimeException( - String.format( - "The used language cannot execute schema changing queries on this entity with the data model %s.", - catalogTable.getNamespaceType() ) ); + //Enable creating a view in a document namespace using the SQL query language + if(language.getNamespaceType().toString()!="RELATIONAL"|| catalogTable.getNamespaceType().toString()!="DOCUMENT") + { + throw new RuntimeException( + String.format( + "The used language cannot execute schema changing queries on this entity with the data model %s.", + catalogTable.getNamespaceType() ) ); + } } }