mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2025-12-23 06:30:05 +00:00
Compare commits
1 Commits
docs/vecto
...
v0.7.1-1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
abfbea4c15 |
@@ -24,7 +24,9 @@ use object_store::Entry;
|
|||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use session::context::QueryContextRef;
|
use session::context::QueryContextRef;
|
||||||
use snafu::{ensure, OptionExt, ResultExt};
|
use snafu::{ensure, OptionExt, ResultExt};
|
||||||
|
use store_api::metric_engine_consts::{LOGICAL_TABLE_METADATA_KEY, METRIC_ENGINE_NAME};
|
||||||
use table::requests::{CopyDatabaseRequest, CopyDirection, CopyTableRequest};
|
use table::requests::{CopyDatabaseRequest, CopyDirection, CopyTableRequest};
|
||||||
|
use table::table_reference::TableReference;
|
||||||
|
|
||||||
use crate::error;
|
use crate::error;
|
||||||
use crate::error::{CatalogSnafu, InvalidCopyDatabasePathSnafu};
|
use crate::error::{CatalogSnafu, InvalidCopyDatabasePathSnafu};
|
||||||
@@ -65,11 +67,29 @@ impl StatementExecutor {
|
|||||||
|
|
||||||
let mut exported_rows = 0;
|
let mut exported_rows = 0;
|
||||||
for table_name in table_names {
|
for table_name in table_names {
|
||||||
// TODO(hl): also handles tables with metric engine.
|
|
||||||
// TODO(hl): remove this hardcode once we've removed numbers table.
|
// TODO(hl): remove this hardcode once we've removed numbers table.
|
||||||
if table_name == "numbers" {
|
if table_name == "numbers" {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let table = self
|
||||||
|
.get_table(&TableReference {
|
||||||
|
catalog: &req.catalog_name,
|
||||||
|
schema: &req.schema_name,
|
||||||
|
table: &table_name,
|
||||||
|
})
|
||||||
|
.await?;
|
||||||
|
// Ignores physical tables of metric engine.
|
||||||
|
if table.table_info().meta.engine == METRIC_ENGINE_NAME
|
||||||
|
&& !table
|
||||||
|
.table_info()
|
||||||
|
.meta
|
||||||
|
.options
|
||||||
|
.extra_options
|
||||||
|
.contains_key(LOGICAL_TABLE_METADATA_KEY)
|
||||||
|
{
|
||||||
|
continue;
|
||||||
|
}
|
||||||
let mut table_file = req.location.clone();
|
let mut table_file = req.location.clone();
|
||||||
table_file.push_str(&table_name);
|
table_file.push_str(&table_name);
|
||||||
table_file.push_str(suffix);
|
table_file.push_str(suffix);
|
||||||
|
|||||||
Reference in New Issue
Block a user