mock

package
v1.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 16, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotFound      = errors.New("not found")
	ErrAlreadyExists = errors.New("already exists")
)

Functions

func AddColumn added in v0.40.3

func AddColumn(m *metastore.Partition, col *metastore.FieldSchema)

func GetByPrefix added in v0.40.3

func GetByPrefix(m map[string]*metastore.Partition, prefix string) []*metastore.Partition

func GetKey added in v0.40.3

func GetKey(dbName, tableName string) string

func GetPartitionKey added in v0.40.3

func GetPartitionKey(dbName, tableName string, partition []string) string

func PartitionsListToMap added in v0.40.3

func PartitionsListToMap(partitions []*metastore.Partition) map[string]*metastore.Partition

Types

type MSClient added in v0.40.3

type MSClient struct {
	Databases map[string]*metastore.Database
	Tables    map[string]*metastore.Table
	// contains filtered or unexported fields
}

func NewMSClient added in v0.40.3

func NewMSClient(t *testing.T, initialDatabases map[string]*metastore.Database, initialTables map[string]*metastore.Table, initialPartitions map[string]*metastore.Partition) *MSClient

func (*MSClient) AddPartition added in v0.40.3

func (m *MSClient) AddPartition(_ context.Context, tableName string, dbName string, newPartition *metastore.Partition) error

func (*MSClient) AddPartitions added in v0.40.3

func (m *MSClient) AddPartitions(ctx context.Context, tableName string, dbName string, newParts []*metastore.Partition) error

func (*MSClient) AlterPartition added in v0.40.3

func (m *MSClient) AlterPartition(_ context.Context, dbName string, tableName string, partition *metastore.Partition) error

func (*MSClient) AlterPartitions added in v0.40.3

func (m *MSClient) AlterPartitions(ctx context.Context, dbName string, tableName string, newPartitions []*metastore.Partition) error

func (*MSClient) AlterTable added in v0.40.3

func (m *MSClient) AlterTable(_ context.Context, dbName string, tableName string, newTable *metastore.Table) error

func (*MSClient) CreateDatabase added in v0.54.0

func (m *MSClient) CreateDatabase(_ context.Context, db *metastore.Database) error

func (*MSClient) CreateTable added in v0.40.3

func (m *MSClient) CreateTable(_ context.Context, table *metastore.Table) error

func (*MSClient) DropPartition added in v0.40.3

func (m *MSClient) DropPartition(_ context.Context, dbName string, tableName string, values []string) error

func (*MSClient) GetDBLocation added in v0.40.3

func (m *MSClient) GetDBLocation(dbName string) string

func (*MSClient) GetDatabase added in v0.40.3

func (m *MSClient) GetDatabase(_ context.Context, name string) (*metastore.Database, error)

func (*MSClient) GetDatabases added in v0.40.3

func (m *MSClient) GetDatabases(_ context.Context, name string) ([]*metastore.Database, error)

func (*MSClient) GetPartition added in v0.40.3

func (m *MSClient) GetPartition(_ context.Context, dbName string, tableName string, values []string) (*metastore.Partition, error)

func (*MSClient) GetPartitionCollection added in v0.40.3

func (m *MSClient) GetPartitionCollection(_ context.Context, _ string, _ string) (metastore.Collection, error)

func (*MSClient) GetPartitions added in v0.40.3

func (m *MSClient) GetPartitions(_ context.Context, dbName string, tableName string) ([]*metastore.Partition, error)

func (*MSClient) GetTable added in v0.40.3

func (m *MSClient) GetTable(_ context.Context, dbname string, tableName string) (*metastore.Table, error)

func (*MSClient) GetTableCollection added in v0.40.3

func (m *MSClient) GetTableCollection(_ context.Context, _ string, _ string) (metastore.Collection, error)

func (*MSClient) GetTables added in v0.40.3

func (m *MSClient) GetTables(_ context.Context, _ string, _ string) ([]*metastore.Table, error)

func (*MSClient) HasTable added in v0.40.3

func (m *MSClient) HasTable(_ context.Context, dbname string, tableName string) (bool, error)

func (*MSClient) NormalizeDBName added in v0.40.3

func (m *MSClient) NormalizeDBName(name string) string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL