Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
andylokandy committed Dec 5, 2023
1 parent 9a316da commit 46edfa8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 18 deletions.
15 changes: 0 additions & 15 deletions src/query/service/src/interpreters/interpreter_table_create.rs
Original file line number Diff line number Diff line change
Expand Up @@ -451,21 +451,6 @@ pub fn is_valid_create_opt<S: AsRef<str>>(opt_key: S) -> bool {
CREATE_TABLE_OPTIONS.contains(opt_key.as_ref().to_lowercase().as_str())
}

/// The internal occupied coulmn that cannot be create.
pub static INTERNAL_COLUMN_KEYS: Lazy<HashSet<&'static str>> = Lazy::new(|| {
let mut r = HashSet::new();

// The key in INTERNAL_COLUMN_FACTORY.
r.insert(ROW_ID_COL_NAME);
r.insert(SNAPSHOT_NAME_COL_NAME);
r.insert(SEGMENT_NAME_COL_NAME);
r.insert(BLOCK_NAME_COL_NAME);

r.insert(PREDICATE_COLUMN_NAME);

r
});

pub fn is_valid_column(name: &str) -> Result<()> {
if INTERNAL_COLUMN_KEYS.contains(name) {
return Err(ErrorCode::TableWithInternalColumnName(format!(
Expand Down
3 changes: 1 addition & 2 deletions src/query/sql/src/planner/plans/update.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ use common_expression::DataSchemaRef;
use common_expression::Expr;
use common_expression::FieldIndex;
use common_expression::RemoteExpr;
use common_expression::PREDICATE_COLUMN_NAME;
use common_functions::BUILTIN_FUNCTIONS;

use crate::binder::wrap_cast_scalar;
Expand All @@ -40,8 +41,6 @@ use crate::BindContext;
use crate::MetadataRef;
use crate::Visibility;

pub const PREDICATE_COLUMN_NAME: &str = "_predicate";

#[derive(Clone, Debug)]
pub struct UpdatePlan {
pub catalog: String,
Expand Down
2 changes: 1 addition & 1 deletion src/query/storages/common/index/src/range_index.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
// limitations under the License.

use common_exception::Result;
use common_expression::INTERNAL_COLUMN_KEYS;
use common_expression::types::decimal::Decimal128Type;
use common_expression::types::decimal::Decimal256Type;
use common_expression::types::decimal::DecimalDataType;
Expand All @@ -36,6 +35,7 @@ use common_expression::Expr;
use common_expression::FunctionContext;
use common_expression::Scalar;
use common_expression::TableSchemaRef;
use common_expression::INTERNAL_COLUMN_KEYS;
use common_functions::BUILTIN_FUNCTIONS;
use storages_common_table_meta::meta::ColumnStatistics;
use storages_common_table_meta::meta::StatisticsOfColumns;
Expand Down

0 comments on commit 46edfa8

Please sign in to comment.