Documentation ¶
Index ¶
Constants ¶
View Source
const MemReserveFactor = 1.2
Variables ¶
This section is empty.
Functions ¶
func MarshalCItoJSON ¶
func MarshalCItoJSON(row abstract.ChangeItem, rules *MarshallingRules, buf *bytes.Buffer) error
Types ¶
type GFMap ¶
type GFMap struct {
// contains filtered or unexported fields
}
func NewGrishaFMap ¶
NewGrishaFMap is a lookuper for name indexes, we accept expected order of names the idea is to have map lookup only when it's needed, i.e. when order of names is not a same as key this give guite a huge perf boost, map lookup on certain json-marshal workloads may consume up to 35% of CPU map named in honor to @GrigoryPervakov, since he was the one who suggest this hack.
type MarshallingRules ¶
type MarshallingRules struct { ColSchema []abstract.ColSchema ColNameToIndex map[string]int ColTypes columntypes.TypeMapping AnyAsString bool // contains filtered or unexported fields }
func NewRules ¶
func NewRules(names []string, colSchema []abstract.ColSchema, colNameToIndex map[string]int, colTypes columntypes.TypeMapping, anyAsString bool) *MarshallingRules
func (*MarshallingRules) SetColType ¶
func (r *MarshallingRules) SetColType(name string, description *columntypes.TypeDescription)
type UploadStats ¶
func UploadCIBatch ¶
func UploadCIBatch( batch []abstract.ChangeItem, rules *MarshallingRules, config model.ChSinkServerParams, table string, avgRowSize int, lgr log.Logger) (*UploadStats, error)
Click to show internal directories.
Click to hide internal directories.