util

package
v1.2.3-hotfix-20241016 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CompactPrimaryCol = compactPrimaryCol
View Source
var CompactSingleIndexCol = compactSingleIndexCol
View Source
var SerialWithCompacted = serialWithCompacted
View Source
var SerialWithoutCompacted = serialWithoutCompacted

Functions

func AppendAnyToStringVector added in v0.8.0

func AppendAnyToStringVector(proc *process.Process, val any, vec *vector.Vector) error

func BinaryToInt added in v1.1.1

func BinaryToInt(b string) (uint64, error)

func BuildCompositeClusterByColumnName added in v0.7.0

func BuildCompositeClusterByColumnName(s []string) string

func BuildIndexTableName added in v0.6.0

func BuildIndexTableName(ctx context.Context, unique bool) (string, error)

func BuildMoColumnsFilter added in v0.7.0

func BuildMoColumnsFilter(curAccountId uint64) tree.Expr

Build the filter condition AST expression for mo_columns, as follows: account_id = current_id or (account_id = 0 and attr_databse in mo_catalog and att_relname not in other tables)

func BuildMoDataBaseFilter added in v0.7.0

func BuildMoDataBaseFilter(curAccountId uint64) tree.Expr

Build the filter condition AST expression for mo_database, as follows: account_id = cur_accountId or (account_id = 0 and datname in ('mo_catalog'))

func BuildMoTablesFilter added in v0.7.0

func BuildMoTablesFilter(curAccountId uint64) tree.Expr

Build the filter condition AST expression for mo_tables, as follows: account_id = cur_account_id or (account_id = 0 and (relname in ('mo_tables','mo_database','mo_columns') or relkind = 'cluster'))

func BuildSysMetricFilter added in v0.8.0

func BuildSysMetricFilter(acctName string) tree.Expr

func BuildSysStatementInfoFilter added in v0.8.0

func BuildSysStatementInfoFilter(acctName string) tree.Expr

func BuildUniqueKeyBatch added in v0.6.0

func BuildUniqueKeyBatch(vecs []*vector.Vector, attrs []string, parts []string, originTablePrimaryKey string, proc *process.Process, packers *PackerList) (*batch.Batch, int, error)

BuildUniqueKeyBatch used in test to validate serialWithCompacted(), compactSingleIndexCol() and compactPrimaryCol()

func CopyBatch added in v0.8.0

func CopyBatch(bat *batch.Batch, proc *process.Process) (*batch.Batch, error)

func DbIsSystemDb added in v0.8.0

func DbIsSystemDb(dbName string) bool

func DecodeBinaryString added in v1.1.1

func DecodeBinaryString(s string) ([]byte, error)

func FillCompositeClusterByBatch added in v0.7.0

func FillCompositeClusterByBatch(bat *batch.Batch, cbName string, proc *process.Process) error

build the clusterBy key's vector of the cluster table according to the composite column name, and append the result vector to batch cbName: column name of composite column

func FillCompositeKeyBatch added in v0.8.0

func FillCompositeKeyBatch(bat *batch.Batch, ckeyName string, keyParts []string, proc *process.Process) error

build the vector of the composite key, and append the result vector to batch ckeyName: column name of composite column keyParts: parts of the composite column

func GenVectorByVarValue added in v0.8.0

func GenVectorByVarValue(proc *process.Process, typ types.Type, val any) (*vector.Vector, error)

func GetClusterByColumnOrder added in v0.7.0

func GetClusterByColumnOrder(cbName, colName string) int

func GetClusterByFirstColumn added in v1.1.0

func GetClusterByFirstColumn(cbName string) string

func GetClusterTableAttributeName added in v0.7.0

func GetClusterTableAttributeName() string

func GetClusterTableAttributeType added in v0.7.0

func GetClusterTableAttributeType() *tree.T

func HexToInt added in v1.1.1

func HexToInt(hex string) (uint64, error)

func InitPredefinedTables added in v1.2.1

func InitPredefinedTables(tables []string)

func IsClusterTableAttribute added in v0.7.0

func IsClusterTableAttribute(name string) bool

func IsValidNameForPartitionTable added in v0.8.0

func IsValidNameForPartitionTable(name string) bool

IsValidNameForPartitionTable the name forms the partition table does not have the partitionDelimiter

func JudgeIsCompositeClusterByColumn added in v0.7.0

func JudgeIsCompositeClusterByColumn(s string) bool

func MakeNameOfPartitionTable added in v0.8.0

func MakeNameOfPartitionTable(partitionName, tableName string) (bool, string)

MakeNameOfPartitionTable !!!NOTE!!! With assumption: the partition name and the table name does not have partitionDelimiter. partition table name format : %!%partition_name%!%table_name

func ScoreBinaryToInt added in v1.2.0

func ScoreBinaryToInt(s string) (uint64, error)

func SetAnyToStringVector added in v0.8.0

func SetAnyToStringVector(proc *process.Process, val any, vec *vector.Vector, idx int) error

func SetBytesToAnyVector added in v0.8.0

func SetBytesToAnyVector(ctx context.Context, val string, row int,
	isNull bool, vec *vector.Vector, proc *process.Process) error

func SetInsertValue added in v0.8.0

func SetInsertValue(proc *process.Process, numVal *tree.NumVal, vec *vector.Vector) (bool, error)

func SplitCompositeClusterByColumnName added in v0.7.0

func SplitCompositeClusterByColumnName(s string) []string

func SplitNameOfPartitionTable added in v0.8.0

func SplitNameOfPartitionTable(name string) (bool, string, string)

SplitNameOfPartitionTable splits the partition table name into partition name and origin table name

func SplitTableAndColumn

func SplitTableAndColumn(name string) (string, string)

func TableIsClusterTable added in v0.7.0

func TableIsClusterTable(tableType string) bool

TableIsClusterTable check the table type is cluster table

func TableIsLoggingTable added in v0.8.0

func TableIsLoggingTable(dbName string, tableName string) bool

Types

type PackerList added in v1.2.0

type PackerList struct {
	// contains filtered or unexported fields
}

func (*PackerList) Free added in v1.2.0

func (list *PackerList) Free()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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