Documentation
¶
Index ¶
- Constants
- Variables
- type Catalog
- type Identifier
- type Metadata
- type MetadataLogEntry
- type MetadataV1
- func (c *MetadataV1) CurrentSchema() *icegopher.Schema
- func (c *MetadataV1) CurrentSnapshot() *Snapshot
- func (c *MetadataV1) DefaultPartitionSpec() int
- func (c *MetadataV1) LastColumn() int
- func (c *MetadataV1) LastPartitionSpecID() *int
- func (c *MetadataV1) LastUpdated() int
- func (c *MetadataV1) Loc() string
- func (c *MetadataV1) PartitionSpec() icegopher.PartitionSpec
- func (c *MetadataV1) PartitionSpecs() []icegopher.PartitionSpec
- func (c *MetadataV1) Properties() icegopher.Properties
- func (c *MetadataV1) Schemas() []*icegopher.Schema
- func (c *MetadataV1) SnapshotByID(id int64) *Snapshot
- func (c *MetadataV1) SnapshotByName(name string) *Snapshot
- func (c *MetadataV1) Snapshots() []Snapshot
- func (c *MetadataV1) SortOrder() SortOrder
- func (c *MetadataV1) SortOrders() []SortOrder
- func (c *MetadataV1) TableUUID() uuid.UUID
- func (m *MetadataV1) ToV2() MetadataV2
- func (m *MetadataV1) UnmarshalJSON(b []byte) error
- func (c *MetadataV1) Version() int
- type MetadataV2
- func (c *MetadataV2) CurrentSchema() *icegopher.Schema
- func (c *MetadataV2) CurrentSnapshot() *Snapshot
- func (c *MetadataV2) DefaultPartitionSpec() int
- func (c *MetadataV2) LastColumn() int
- func (c *MetadataV2) LastPartitionSpecID() *int
- func (c *MetadataV2) LastUpdated() int
- func (c *MetadataV2) Loc() string
- func (c *MetadataV2) PartitionSpec() icegopher.PartitionSpec
- func (c *MetadataV2) PartitionSpecs() []icegopher.PartitionSpec
- func (c *MetadataV2) Properties() icegopher.Properties
- func (c *MetadataV2) Schemas() []*icegopher.Schema
- func (c *MetadataV2) SnapshotByID(id int64) *Snapshot
- func (c *MetadataV2) SnapshotByName(name string) *Snapshot
- func (c *MetadataV2) Snapshots() []Snapshot
- func (c *MetadataV2) SortOrder() SortOrder
- func (c *MetadataV2) SortOrders() []SortOrder
- func (c *MetadataV2) TableUUID() uuid.UUID
- func (m *MetadataV2) UnmarshalJSON(b []byte) error
- func (c *MetadataV2) Version() int
- type NullOrder
- type Operation
- type PropertiesUpdateSummary
- type RefType
- type Snapshot
- type SnapshotLogEntry
- type SnapshotRef
- type SortDirection
- type SortField
- type SortOrder
- type Summary
- type Table
- func (t Table) Catalog() Catalog
- func (t Table) CurrentSnapshot() *Snapshot
- func (t Table) Equals(other Table) bool
- func (t Table) FS() io.IO
- func (t Table) Identifier() Identifier
- func (t Table) Location() string
- func (t Table) Metadata() Metadata
- func (t Table) MetadataLoc() string
- func (t Table) Properties() icegopher.Properties
- func (t *Table) Refresh() (*Table, error)
- func (t Table) Schema() *icegopher.Schema
- func (t Table) Schemas() map[int]*icegopher.Schema
- func (t Table) SnapshotByID(id int64) *Snapshot
- func (t Table) SnapshotByName(name string) *Snapshot
- func (t Table) SortOrder() SortOrder
- func (t Table) Spec() icegopher.PartitionSpec
Constants ¶
View Source
const ( InitialSortOrderID = 1 UnsortedSortOrderID = 0 )
View Source
const MainBranch = "main"
Variables ¶
View Source
var ( ErrInvalidMetadataFormatVersion = errors.New("invalid or missing format-version in table metadata") ErrInvalidMetadata = errors.New("invalid metadata") )
View Source
var ( ErrInvalidOperation = errors.New("invalid operation value") ErrMissingOperation = errors.New("missing operation key") )
View Source
var ( ErrInvalidSortDirection = errors.New("invalid sort direction, must be 'asc' or 'desc'") ErrInvalidNullOrder = errors.New("invalid null order, must be 'nulls-first' or 'nulls-last'") )
View Source
var (
ErrInvalidRefType = errors.New("invalid snapshot ref type, should be 'branch' or 'tag'")
)
View Source
var UnsortedSortOrder = SortOrder{OrderID: UnsortedSortOrderID, Fields: []SortField{}}
Functions ¶
This section is empty.
Types ¶
type Catalog ¶
type Catalog interface {
LoadTable(...string) (*Table, error)
DropTable(...string) error
RenameTable(from, to Identifier) (*Table, error)
CreateNamespace(props icegopher.Properties, namespace ...string) error
DropNamespace(...string) error
ListTables(namespace ...string) ([]Identifier, error)
ListNamespaces(...string) ([]Identifier, error)
LoadNamespaceProperties(...string) (icegopher.Properties, error)
UpdateNamespaceProperties(namespace Identifier, removals []string, updates icegopher.Properties) (PropertiesUpdateSummary, error)
}
type Identifier ¶
type Identifier = []string
type Metadata ¶
type Metadata interface {
Version() int
TableUUID() uuid.UUID
Loc() string
LastUpdated() int
LastColumn() int
Schemas() []*icegopher.Schema
CurrentSchema() *icegopher.Schema
PartitionSpecs() []icegopher.PartitionSpec
PartitionSpec() icegopher.PartitionSpec
DefaultPartitionSpec() int
LastPartitionSpecID() *int
Snapshots() []Snapshot
SnapshotByID(int64) *Snapshot
SnapshotByName(name string) *Snapshot
CurrentSnapshot() *Snapshot
SortOrder() SortOrder
SortOrders() []SortOrder
Properties() icegopher.Properties
}
func ParseMetadataBytes ¶
func ParseMetadataString ¶
type MetadataLogEntry ¶
type MetadataV1 ¶
type MetadataV1 struct {
Schema icegopher.Schema `json:"schema"`
Partition []icegopher.PartitionField `json:"partition-spec"`
// contains filtered or unexported fields
}
func (*MetadataV1) CurrentSchema ¶
func (*MetadataV1) CurrentSnapshot ¶
func (c *MetadataV1) CurrentSnapshot() *Snapshot
func (*MetadataV1) DefaultPartitionSpec ¶
func (c *MetadataV1) DefaultPartitionSpec() int
func (*MetadataV1) LastColumn ¶
func (c *MetadataV1) LastColumn() int
func (*MetadataV1) LastPartitionSpecID ¶
func (c *MetadataV1) LastPartitionSpecID() *int
func (*MetadataV1) LastUpdated ¶
func (c *MetadataV1) LastUpdated() int
func (*MetadataV1) PartitionSpec ¶
func (c *MetadataV1) PartitionSpec() icegopher.PartitionSpec
func (*MetadataV1) PartitionSpecs ¶
func (c *MetadataV1) PartitionSpecs() []icegopher.PartitionSpec
func (*MetadataV1) Properties ¶
func (c *MetadataV1) Properties() icegopher.Properties
func (*MetadataV1) SnapshotByID ¶
func (*MetadataV1) SnapshotByName ¶
func (*MetadataV1) SortOrders ¶
func (c *MetadataV1) SortOrders() []SortOrder
func (*MetadataV1) ToV2 ¶
func (m *MetadataV1) ToV2() MetadataV2
func (*MetadataV1) UnmarshalJSON ¶
func (m *MetadataV1) UnmarshalJSON(b []byte) error
type MetadataV2 ¶
type MetadataV2 struct {
LastSequenceNumber int `json:"last-sequence-number"`
// contains filtered or unexported fields
}
func (*MetadataV2) CurrentSchema ¶
func (*MetadataV2) CurrentSnapshot ¶
func (c *MetadataV2) CurrentSnapshot() *Snapshot
func (*MetadataV2) DefaultPartitionSpec ¶
func (c *MetadataV2) DefaultPartitionSpec() int
func (*MetadataV2) LastColumn ¶
func (c *MetadataV2) LastColumn() int
func (*MetadataV2) LastPartitionSpecID ¶
func (c *MetadataV2) LastPartitionSpecID() *int
func (*MetadataV2) LastUpdated ¶
func (c *MetadataV2) LastUpdated() int
func (*MetadataV2) PartitionSpec ¶
func (c *MetadataV2) PartitionSpec() icegopher.PartitionSpec
func (*MetadataV2) PartitionSpecs ¶
func (c *MetadataV2) PartitionSpecs() []icegopher.PartitionSpec
func (*MetadataV2) Properties ¶
func (c *MetadataV2) Properties() icegopher.Properties
func (*MetadataV2) SnapshotByID ¶
func (*MetadataV2) SnapshotByName ¶
func (*MetadataV2) SortOrders ¶
func (c *MetadataV2) SortOrders() []SortOrder
func (*MetadataV2) UnmarshalJSON ¶
func (m *MetadataV2) UnmarshalJSON(b []byte) error
type PropertiesUpdateSummary ¶
type Snapshot ¶
type Snapshot struct {
SnapshotID int64 `json:"snapshot-id"`
ParentSnapshotID *int64 `json:"parent-snapshot-id,omitempty"`
SequenceNumber int `json:"sequence-number"`
TimestampMs int `json:"timestamp-ms"`
ManifestList string `json:"manifest-list,omitempty"`
Summary *Summary `json:"summary,omitempty"`
SchemaID *int `json:"schema-id,omitempty"`
}
type SnapshotLogEntry ¶
type SnapshotRef ¶
type SnapshotRef struct {
SnapshotID int64 `json:"snapshot-id"`
SnapshotRefType RefType `json:"type"`
MinSnapshotsToKeep *int `json:"min-snapshots-to-keep,omitempty"`
MaxSnapshotAgeMs *int `json:"max-snapshot-age-ms,omitempty"`
MaxRefAgeMs *int `json:"max-ref-age-ms,omitempty"`
}
func (*SnapshotRef) UnmarshalJSON ¶
func (s *SnapshotRef) UnmarshalJSON(b []byte) error
type SortDirection ¶
type SortDirection string
const ( SortASC SortDirection = "asc" SortDESC SortDirection = "desc" )
type SortField ¶
type SortField struct {
SourceID int `json:"source-id"`
Transform icegopher.Transform `json:"transform"`
Direction SortDirection `json:"direction"`
NullOrder NullOrder `json:"null-order"`
}
func (*SortField) MarshalJSON ¶
func (*SortField) UnmarshalJSON ¶
type SortOrder ¶
func (*SortOrder) UnmarshalJSON ¶
type Table ¶
type Table struct {
// contains filtered or unexported fields
}
func NewFromLocation ¶
func (Table) CurrentSnapshot ¶
func (Table) Identifier ¶
func (t Table) Identifier() Identifier
func (Table) MetadataLoc ¶
func (Table) Properties ¶
func (t Table) Properties() icegopher.Properties
func (Table) SnapshotByID ¶
func (Table) SnapshotByName ¶
func (Table) Spec ¶
func (t Table) Spec() icegopher.PartitionSpec
Click to show internal directories.
Click to hide internal directories.