external

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2023 License: Apache-2.0 Imports: 39 Imported by: 0

Documentation

Index

Constants

View Source
const NULL_FLAG = "\\N"

Variables

View Source
var (
	ONE_BATCH_MAX_ROW  = 40000
	S3_PARALLEL_MAXNUM = 10
)
View Source
var (
	STATEMENT_ACCOUNT = "account"
)

Functions

func Call

func Call(idx int, proc *process.Process, arg any, isFirst bool, isLast bool) (bool, error)

func ColumnCntLargerErrorInfo added in v0.7.0

func ColumnCntLargerErrorInfo() string

func FilterFileList added in v0.7.0

func FilterFileList(node *plan.Node, proc *process.Process, fileList []string, fileSize []int64) ([]string, []int64, error)

func GetBatchData

func GetBatchData(param *ExternalParam, plh *ParseLineHandler, proc *process.Process) (*batch.Batch, error)

func IsSysTable added in v0.7.0

func IsSysTable(dbName string, tableName string) bool

func Prepare

func Prepare(proc *process.Process, arg any) error

func ReadFile

func ReadFile(param *ExternalParam, proc *process.Process) (io.ReadCloser, error)

func ReadFileOffset added in v0.7.0

func ReadFileOffset(param *tree.ExternParam, proc *process.Process, mcpu int, fileSize int64) ([][2]int, error)

func ScanCsvFile added in v0.7.0

func ScanCsvFile(param *ExternalParam, proc *process.Process) (*batch.Batch, error)

func ScanFileData

func ScanFileData(param *ExternalParam, proc *process.Process) (*batch.Batch, error)

ScanFileData read batch data from external file

func ScanZonemapFile added in v0.7.0

func ScanZonemapFile(param *ExternalParam, proc *process.Process) (*batch.Batch, error)

func String

func String(arg any, buf *bytes.Buffer)

Types

type Argument

type Argument struct {
	Es *ExternalParam
}

func (*Argument) Free

func (arg *Argument) Free(proc *process.Process, pipelineFailed bool)

type ExFileparam added in v0.7.0

type ExFileparam struct {
	End       bool
	FileCnt   int
	FileFin   int
	FileIndex int
	Filepath  string
}

type ExParam added in v0.7.0

type ExParam struct {
	Fileparam *ExFileparam
	Zoneparam *ZonemapFileparam
	Filter    *FilterParam
	// contains filtered or unexported fields
}

type ExParamConst added in v0.7.0

type ExParamConst struct {
	IgnoreLine    int
	IgnoreLineTag int

	CreateSql     string
	Attrs         []string
	Cols          []*plan.ColDef
	OriginCols    []*plan.ColDef
	FileList      []string
	FileSize      []int64
	FileOffset    [][2]int
	Name2ColIndex map[string]int32
	Ctx           context.Context
	Extern        *tree.ExternParam

	ClusterTable *plan.ClusterTable
	// contains filtered or unexported fields
}

type ExternalParam

type ExternalParam struct {
	// Externally passed parameters that will not change
	ExParamConst
	// Inner parameters
	ExParam
}

Use for External table scan param

type FilterParam added in v0.7.0

type FilterParam struct {
	File2Size  map[string]int64
	FilterExpr *plan.Expr
	// contains filtered or unexported fields
}

type ParseLineHandler

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

func GetSimdcsvReader

func GetSimdcsvReader(param *ExternalParam, proc *process.Process) (*ParseLineHandler, error)

GetSimdcsvReader get file reader from external file

type ZonemapFileparam added in v0.7.0

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

Jump to

Keyboard shortcuts

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