scratchcatalog

package
v1.137.0 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package scratchcatalog reads the query engine's refusals of the scratch catalog's partition procedures and states the setting that fixes each (#1888). The webhook source pre-check and the Trino connection test both meet these refusals, and an operator reading either needs the same sentence: which rule or property to add, and where the setup is written down.

It knows the three procedures the platform calls and the shape of Trino's answers, nothing about connections or sources.

Index

Constants

View Source
const (
	SyncPartitionMetadata = "sync_partition_metadata"
	RegisterPartition     = "register_partition"
	UnregisterPartition   = "unregister_partition"
)

The partition procedures the platform calls on a scratch catalog. Webhook sources use all three; registered tables use none.

View Source
const (
	DocsAccessControl = "docs/server/scratch-catalog.md#access-control"
	DocsCatalog       = "docs/server/scratch-catalog.md#the-catalog"
)

DocsAccessControl and DocsCatalog are where the setup is written down.

Variables

View Source
var ErrProcedureDenied = errors.New("the scratch connection's Trino user may not execute a partition procedure")

ErrProcedureDenied is the engine's access control refusing a partition procedure to the connection's Trino user.

View Source
var ErrRegisterDisabled = errors.New("the scratch catalog does not allow register_partition")

ErrRegisterDisabled is the catalog refusing register_partition because hive.allow-register-partition-procedure is not set.

Procedures is every partition procedure the platform calls, in the order a check reports them.

Functions

func Classify

func Classify(connection, catalog string, err error) error

Classify wraps err with the sentence that fixes it when it is one of the two refusals, keeping err and the matching sentinel for errors.Is. Any other error is returned as it is.

func Denied

func Denied(err error) (string, bool)

Denied reports the procedure an error says the user may not execute, as Trino names it (catalog.schema.procedure), or false when the error is not that refusal.

func DeniedRemedy

func DeniedRemedy(connection, procedure string) string

DeniedRemedy is the sentence an operator acts on when the Trino user of connection may not execute procedure (as Denied reported it).

func Disabled

func Disabled(err error) bool

Disabled reports whether an error is the catalog refusing register_partition for want of hive.allow-register-partition-procedure.

func DisabledRemedy

func DisabledRemedy(catalog string) string

DisabledRemedy is the sentence an operator acts on when catalog refuses register_partition.

Types

This section is empty.

Jump to

Keyboard shortcuts

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