Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 8 additions & 4 deletions dbms/src/main/java/org/polypheny/db/ddl/DdlManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() ) );
}
}
}

Expand Down