metastore/common/errors.go (42 lines of code) (raw):
// Copyright (c) 2017-2018 Uber Technologies, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package common
import (
"errors"
)
var (
// ErrTableDoesNotExist indicates Table does not exist
ErrTableDoesNotExist = errors.New("Table does not exist")
// ErrTableAlreadyExist indicates Table already exists
ErrTableAlreadyExist = errors.New("Table already exists")
// ErrColumnDoesNotExist indicates Column does not exist error
ErrColumnDoesNotExist = errors.New("Column does not exist")
// ErrColumnAlreadyExist indicates Column already exists
ErrColumnAlreadyExist = errors.New("Column already exists")
// ErrColumnAlreadyDeleted indicates Column already deleted
ErrColumnAlreadyDeleted = errors.New("Column already deleted")
// ErrNotEnumColumn indicates Column is not enum type
ErrNotEnumColumn = errors.New("Column is not enum type")
// ErrEnumCardinalityOverflow indicates invalid enum extension over cardinality limit
ErrEnumCardinalityOverflow = errors.New("Enum column cardinality exceeds limit")
// ErrShardDoesNotExist indicates Shard does not exist
ErrShardDoesNotExist = errors.New("Shard does not exist")
// ErrNotFactTable indicates table not a fact table
ErrNotFactTable = errors.New("Table is not fact table")
// ErrNotDimensionTable indicates table is not a dimension table
ErrNotDimensionTable = errors.New("Table is not dimension table")
// ErrWatcherAlreadyExist indicates table is not a dimension table
ErrWatcherAlreadyExist = errors.New("Watcher already registered")
// ErrDeleteTimeColumn indicates column is time column and cannot be deleted
ErrDeleteTimeColumn = errors.New("Time column cannot be deleted")
// ErrDeletePrimaryKeyColumn indicates column belongs to primary key cannot be deleted
ErrDeletePrimaryKeyColumn = errors.New("Primary key column cannot be deleted")
// ErrChangePrimaryKeyColumn indicates primary key columns cannot be changed
ErrChangePrimaryKeyColumn = errors.New("Primary key column cannot be changed")
// ErrAllColumnsInvalid indicates all columns are invalid
ErrAllColumnsInvalid = errors.New("All columns are invalid")
// ErrMissingPrimaryKey indicates a schema does not have primary key
ErrMissingPrimaryKey = errors.New("Primary key columns not specified")
// ErrColumnNonExist indicates a column used does not exist
ErrColumnNonExist = errors.New("Column does not exist")
// ErrColumnDeleted indicates a column used was deleted
ErrColumnDeleted = errors.New("Column already deleted")
// ErrInvalidDataType indicates invalid data type
ErrInvalidDataType = errors.New("Invalid data type")
// ErrIllegalSchemaVersion indicates new schema is not greater than old one
ErrIllegalSchemaVersion = errors.New("New schema version not greater than old")
// ErrSchemaUpdateNotAllowed indicates changes attemped on immutable fields
ErrSchemaUpdateNotAllowed = errors.New("Illegal schame update on immutable field")
// ErrInsufficientColumnCount indicates no column in a schame
ErrInsufficientColumnCount = errors.New("Insufficient column count")
// ErrReusingColumnIDNotAllowed indicates attempt to reuse id of deleted column
ErrReusingColumnIDNotAllowed = errors.New("Reusing column id not allowed")
// ErrIllegalChangeSortColumn indicates illegal changes on sort columns
ErrIllegalChangeSortColumn = errors.New("Illegal changes on sort columns")
// ErrDuplicatedColumn indicates a column is used more than onces in sort or pk columns
ErrDuplicatedColumn = errors.New("Illegal deplicated use of column")
// ErrDuplicatedColumnName indicates duplicated column name in same table
ErrDuplicatedColumnName = errors.New("Duplicated column name found")
ErrMissingTimeColumn = errors.New("Fact table has to have time column as first column")
ErrTimeColumnDoesNotAllowDefault = errors.New("Time column does not allow default value")
ErrDisallowMissingEventTime = errors.New("Can not disallow missing event time")
// ErrTimeColumnDoesNotAllowHLLConfig indicates hll configured for time column
ErrTimeColumnDoesNotAllowHLLConfig = errors.New("HLLConfig not allowed for time column")
ErrHLLColumnDoesNotAllowDefaultValue = errors.New("hll column does not allow default value")
ErrInvalidTableBatchSize = errors.New("Table batch size should be larger than zero")
ErrInvalidPrimaryKeyBucketSize = errors.New("Table primary key bucket size should be larger than zero")
ErrInvalidPrimaryKeyDataType = errors.New("Specified data type can not be used as primary key")
ErrInvalidSortColumnDataType = errors.New("Specified data type can not be used as sorting column")
// ErrMaxEnumIDReached indicates a column has already reached its maximum enum id
// eg. SmallEnum: 255, BigEnum: 65535
ErrMaxEnumIDReached = errors.New("Maximum enum id reached")
)