Skip to content

Commit

Permalink
feat: copy database ignores view and temporary tables (#4640)
Browse files Browse the repository at this point in the history
feat: copy database ingores view and temporary tables
  • Loading branch information
fengjiachun authored Aug 29, 2024
1 parent 9f9c1da commit b062d85
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/operator/src/statement/copy_database.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,18 +67,17 @@ impl StatementExecutor {

let mut exported_rows = 0;
for table_name in table_names {
// TODO(hl): remove this hardcode once we've removed numbers table.
if table_name == "numbers" {
continue;
}

let table = self
.get_table(&TableReference {
catalog: &req.catalog_name,
schema: &req.schema_name,
table: &table_name,
})
.await?;
// Only base tables, ignores views and temporary tables.
if table.table_type() != table::metadata::TableType::Base {
continue;
}
// Ignores physical tables of metric engine.
if table.table_info().meta.engine == METRIC_ENGINE_NAME
&& !table
Expand Down

0 comments on commit b062d85

Please sign in to comment.