Documentation
¶
Index ¶
- func CreateStagedTable(ctx context.Context, catprops iceberg.Properties, ...) (table.StagedTable, error)
- func CreateStagedTableWithNamespaceKey(ctx context.Context, catprops iceberg.Properties, ...) (table.StagedTable, error)
- func GetUpdatedPropsAndUpdateSummary(currentProps iceberg.Properties, removals []string, updates iceberg.Properties) (iceberg.Properties, catalog.PropertiesUpdateSummary, error)
- func LoadFSFuncWithRegistry(registry *icebergio.Registry, props map[string]string, location string) table.FSysF
- func LoadFSWithRegistry(ctx context.Context, registry *icebergio.Registry, props map[string]string, ...) (icebergio.IO, error)
- func ParseMetadataVersion(location string) int
- func RejectUnlessConflict(err error) error
- func ResolveTableLocation(ctx context.Context, loc, dbname, tablename string, ...) (string, error)
- func ResolveTableLocationWithNamespace(ctx context.Context, loc string, namespace table.Identifier, ...) (string, error)
- func UpdateAndStageTable(ctx context.Context, catprops iceberg.Properties, current *table.Table, ...) (_ *table.StagedTable, err error)
- func UpdateTableMetadata(base table.Metadata, updates []table.Update, metadataLoc string) (table.Metadata, error)
- func ValidateRequirements(ident table.Identifier, current table.Metadata, reqs []table.Requirement) error
- func WriteMetadata(ctx context.Context, tbl *table.Table) error
- func WriteTableMetadata(ctx context.Context, metadata table.Metadata, fs icebergio.WriteFileIO, ...) (err error)
- type GetNamespacePropsFn
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateStagedTable ¶ added in v0.3.0
func CreateStagedTable( ctx context.Context, catprops iceberg.Properties, nspropsFn GetNamespacePropsFn, ident table.Identifier, sc *iceberg.Schema, registry *icebergio.Registry, opts ...catalog.CreateTableOpt, ) (table.StagedTable, error)
CreateStagedTable stages table metadata using a catalog-scoped FileIO registry. A nil registry selects the process-wide default.
func CreateStagedTableWithNamespaceKey ¶ added in v0.7.0
func CreateStagedTableWithNamespaceKey( ctx context.Context, catprops iceberg.Properties, nspropsFn GetNamespacePropsFn, ident table.Identifier, namespaceKey string, sc *iceberg.Schema, registry *icebergio.Registry, opts ...catalog.CreateTableOpt, ) (table.StagedTable, error)
CreateStagedTableWithNamespaceKey creates a staged table using namespaceKey in its default warehouse location while retaining ident's namespace components for namespace property lookup.
func GetUpdatedPropsAndUpdateSummary ¶ added in v0.8.0
func GetUpdatedPropsAndUpdateSummary(currentProps iceberg.Properties, removals []string, updates iceberg.Properties) (iceberg.Properties, catalog.PropertiesUpdateSummary, error)
GetUpdatedPropsAndUpdateSummary applies removals and updates to currentProps and returns the updated properties alongside a summary of the changes. It is shared by the catalog backend implementations.
func LoadFSFuncWithRegistry ¶ added in v0.8.0
func LoadFSFuncWithRegistry(registry *icebergio.Registry, props map[string]string, location string) table.FSysF
LoadFSFuncWithRegistry creates a lazy FileIO loader bound to the selected registry. Choosing the loader here prevents later table reads from reverting to the global registry.
func LoadFSWithRegistry ¶ added in v0.8.0
func LoadFSWithRegistry(ctx context.Context, registry *icebergio.Registry, props map[string]string, location string) (icebergio.IO, error)
LoadFSWithRegistry uses the global FileIO registry when registry is nil. A non-nil (including empty) registry is strictly isolated.
func ParseMetadataVersion ¶
func RejectUnlessConflict ¶ added in v0.8.0
RejectUnlessConflict wraps non-conflict errors with table.ErrCommitRejected. Use it only before the catalog has written anything.
func ResolveTableLocation ¶ added in v0.3.0
func ResolveTableLocation( ctx context.Context, loc, dbname, tablename string, catprops iceberg.Properties, nsprops GetNamespacePropsFn, ) (string, error)
func ResolveTableLocationWithNamespace ¶ added in v0.7.0
func ResolveTableLocationWithNamespace( ctx context.Context, loc string, namespace table.Identifier, namespaceKey, tablename string, catprops iceberg.Properties, nsprops GetNamespacePropsFn, ) (string, error)
ResolveTableLocationWithNamespace keeps namespace property lookup component-aware while allowing catalogs to provide a distinct key for the default warehouse path.
func UpdateAndStageTable ¶ added in v0.3.0
func UpdateAndStageTable(ctx context.Context, catprops iceberg.Properties, current *table.Table, ident table.Identifier, reqs []table.Requirement, updates []table.Update, cat table.CatalogIO, registry *icebergio.Registry) (_ *table.StagedTable, err error)
UpdateAndStageTable applies updates to the current table without writing anything. Every error it returns matches table.ErrCommitRejected unless it matches table.ErrCommitFailed. A nil registry uses the default FileIO registry.
func UpdateTableMetadata ¶
func ValidateRequirements ¶ added in v0.8.0
func ValidateRequirements(ident table.Identifier, current table.Metadata, reqs []table.Requirement) error
ValidateRequirements checks commit requirements against the table's current metadata, which is nil when the table does not exist. A failed requirement on a missing table is reported as catalog.ErrNoSuchTable. Any other failure is returned as the requirement reported it, which matches table.ErrCommitFailed when a concurrent writer changed the table, so the commit retry loop can refresh and replay, as it does for a REST 409.
Types ¶
type GetNamespacePropsFn ¶ added in v0.3.0
type GetNamespacePropsFn func(context.Context, table.Identifier) (iceberg.Properties, error)