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 ¶
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.
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 ¶
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.
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.
var Procedures = []string{SyncPartitionMetadata, RegisterPartition, UnregisterPartition}
Procedures is every partition procedure the platform calls, in the order a check reports them.
Functions ¶
func Classify ¶
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 ¶
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 ¶
DeniedRemedy is the sentence an operator acts on when the Trino user of connection may not execute procedure (as Denied reported it).
func Disabled ¶
Disabled reports whether an error is the catalog refusing register_partition for want of hive.allow-register-partition-procedure.
func DisabledRemedy ¶
DisabledRemedy is the sentence an operator acts on when catalog refuses register_partition.
Types ¶
This section is empty.