parquet-go: Index | Files

package schema

import ""


Package Files

csv.go gettype.go json.go schemahandler.go

type Item Uses

type Item struct {
    GoType reflect.Type
    Info   *common.Tag

func NewItem Uses

func NewItem() *Item

type JSONSchemaItemType Uses

type JSONSchemaItemType struct {
    Tag    string
    Fields []*JSONSchemaItemType

func NewJSONSchemaItem Uses

func NewJSONSchemaItem() *JSONSchemaItemType

type PathMapType Uses

type PathMapType struct {
    Path     string
    Children map[string]*PathMapType

PathMapType records the path and its children; This is used in Marshal for improve performance.

func NewPathMap Uses

func NewPathMap(path string) *PathMapType

func (*PathMapType) Add Uses

func (self *PathMapType) Add(path []string)

type SchemaHandler Uses

type SchemaHandler struct {
    SchemaElements []*parquet.SchemaElement
    MapIndex       map[string]int32
    IndexMap       map[int32]string
    PathMap        *PathMapType
    Infos          []*common.Tag

    InPathToExPath map[string]string
    ExPathToInPath map[string]string

    ValueColumns []string

SchemaHandler stores the schema data

func NewSchemaHandlerFromJSON Uses

func NewSchemaHandlerFromJSON(str string) (sh *SchemaHandler, err error)

func NewSchemaHandlerFromMetadata Uses

func NewSchemaHandlerFromMetadata(mds []string) *SchemaHandler

Create a schema handler from CSV metadata

func NewSchemaHandlerFromSchemaList Uses

func NewSchemaHandlerFromSchemaList(schemas []*parquet.SchemaElement) *SchemaHandler

NewSchemaHandlerFromSchemaList creates schema handler from schema list

func NewSchemaHandlerFromStruct Uses

func NewSchemaHandlerFromStruct(obj interface{}) (sh *SchemaHandler, err error)

Create schema handler from a object

func (*SchemaHandler) ConvertToInPathStr Uses

func (self *SchemaHandler) ConvertToInPathStr(pathStr string) (string, error)

Convert a path to internal path

func (*SchemaHandler) CreateInExMap Uses

func (self *SchemaHandler) CreateInExMap()

func (*SchemaHandler) GetColumnNum Uses

func (self *SchemaHandler) GetColumnNum() int64

func (*SchemaHandler) GetExName Uses

func (self *SchemaHandler) GetExName(index int) string

func (*SchemaHandler) GetInName Uses

func (self *SchemaHandler) GetInName(index int) string

func (*SchemaHandler) GetRepetitionLevelIndex Uses

func (self *SchemaHandler) GetRepetitionLevelIndex(path []string, rl int32) (int32, error)

MaxRepetitionLevel returns the max repetition level type of a column by it's schema path

func (*SchemaHandler) GetRepetitionType Uses

func (self *SchemaHandler) GetRepetitionType(path []string) (parquet.FieldRepetitionType, error)

GetRepetitionType returns the repetition type of a column by it's schema path

func (*SchemaHandler) GetRootExName Uses

func (self *SchemaHandler) GetRootExName() string

func (*SchemaHandler) GetRootInName Uses

func (self *SchemaHandler) GetRootInName() string

Get root name from the schema handler

func (*SchemaHandler) GetType Uses

func (self *SchemaHandler) GetType(prefixPath string) (reflect.Type, error)

func (*SchemaHandler) GetTypes Uses

func (self *SchemaHandler) GetTypes() []reflect.Type

Get object type from schema by reflect

func (*SchemaHandler) MaxDefinitionLevel Uses

func (self *SchemaHandler) MaxDefinitionLevel(path []string) (int32, error)

MaxDefinitionLevel returns the max definition level type of a column by it's schema path

func (*SchemaHandler) MaxRepetitionLevel Uses

func (self *SchemaHandler) MaxRepetitionLevel(path []string) (int32, error)

MaxRepetitionLevel returns the max repetition level type of a column by it's schema path

Package schema imports 7 packages (graph) and is imported by 4 packages. Updated 2019-09-16. Refresh now. Tools for package owners.