Skip to content

Commit

Permalink
chore: add logs
Browse files Browse the repository at this point in the history
  • Loading branch information
WenyXu committed Nov 6, 2024
1 parent 8dcf48f commit 3b592fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions src/store-api/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ common-base.workspace = true
common-error.workspace = true
common-macro.workspace = true
common-recordbatch.workspace = true
common-telemetry.workspace = true
common-time.workspace = true
common-wal.workspace = true
datafusion-expr.workspace = true
Expand Down
11 changes: 11 additions & 0 deletions src/store-api/src/metadata.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use api::v1::SemanticType;
use common_error::ext::ErrorExt;
use common_error::status_code::StatusCode;
use common_macro::stack_trace_debug;
use common_telemetry::info;
use datatypes::arrow::datatypes::FieldRef;
use datatypes::schema::{ColumnSchema, Schema, SchemaRef};
use serde::de::Error;
Expand Down Expand Up @@ -333,6 +334,16 @@ impl RegionMetadata {

// Check whether column id is duplicated. We already check column name
// is unique in `Schema` so we only check column id here.
if id_names.contains_key(&col.column_id) {
info!(
"The column {} and {} have the same column id {}, region_id: {}, schema: {:?}",
id_names[&col.column_id],
col.column_schema.name,
col.column_id,
self.region_id,
self.schema,
);
}
ensure!(
!id_names.contains_key(&col.column_id),
InvalidMetaSnafu {
Expand Down

0 comments on commit 3b592fa

Please sign in to comment.