use of io.trino.sql.tree.QualifiedName in project trino by trinodb.
the class TestRenameTableTask method testRenameTableOnMaterializedViewIfExists.
@Test
public void testRenameTableOnMaterializedViewIfExists() {
QualifiedName viewName = qualifiedName("existing_materialized_view");
metadata.createMaterializedView(testSession, QualifiedObjectName.valueOf(viewName.toString()), someMaterializedView(), false, false);
getFutureValue(executeRenameTable(viewName, qualifiedName("existing_materialized_view_new"), true));
// no exception
}
use of io.trino.sql.tree.QualifiedName in project trino by trinodb.
the class TestDropMaterializedViewTask method testDropNotExistingMaterializedViewIfExists.
@Test
public void testDropNotExistingMaterializedViewIfExists() {
QualifiedName viewName = qualifiedName("not_existing_materialized_view");
getFutureValue(executeDropMaterializedView(viewName, true));
// no exception
}
use of io.trino.sql.tree.QualifiedName in project trino by trinodb.
the class TestDropMaterializedViewTask method testDropMaterializedViewOnViewIfExists.
@Test
public void testDropMaterializedViewOnViewIfExists() {
QualifiedName viewName = qualifiedName("existing_view");
metadata.createView(testSession, asQualifiedObjectName(viewName), someView(), false);
getFutureValue(executeDropMaterializedView(viewName, true));
// no exception
}
use of io.trino.sql.tree.QualifiedName in project trino by trinodb.
the class TestDropMaterializedViewTask method testDropMaterializedViewOnView.
@Test
public void testDropMaterializedViewOnView() {
QualifiedName viewName = qualifiedName("existing_view");
metadata.createView(testSession, asQualifiedObjectName(viewName), someView(), false);
assertTrinoExceptionThrownBy(() -> getFutureValue(executeDropMaterializedView(viewName, false))).hasErrorCode(TABLE_NOT_FOUND).hasMessage("Materialized view '%s' does not exist, but a view with that name exists. Did you mean DROP VIEW %s?", viewName, viewName);
}
use of io.trino.sql.tree.QualifiedName in project trino by trinodb.
the class TestDropTableTask method testDropTableOnMaterializedViewIfExists.
@Test
public void testDropTableOnMaterializedViewIfExists() {
QualifiedName viewName = qualifiedName("existing_materialized_view");
metadata.createMaterializedView(testSession, asQualifiedObjectName(viewName), someMaterializedView(), false, false);
getFutureValue(executeDropTable(viewName, true));
// no exception
}
Aggregations