util

package
v1.0.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 22 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

Functions

func AppendAnyToStringVector added in v0.8.0

func AppendAnyToStringVector(proc *process.Process, val any, vec *vector.Vector) 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) (*batch.Batch, int)

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 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 GetClusterTableAttributeName added in v0.7.0

func GetClusterTableAttributeName() string

func GetClusterTableAttributeType added in v0.7.0

func GetClusterTableAttributeType() *tree.T

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 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

This section is empty.

Jump to

Keyboard shortcuts

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