runtime

package
v0.0.0-debug-20260702 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package runtime holds the fulltext index's catalog-side metadata. Fulltext fits the catalog hook contract cleanly even though it parses to *tree.FullTextIndex (handled separately by BuildFullTextIndexDefs): it has a single hidden table, no op-types, and async CDC support.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CatalogHooks

type CatalogHooks struct{}

CatalogHooks implements plugin/catalog.Hooks for fulltext indexes.

func (CatalogHooks) AlterTableCloneBehavior

func (CatalogHooks) AlterTableCloneBehavior() catalogplugin.AlterTableCloneBehavior

AlterTableCloneBehavior — fulltext's single hidden table is empty at CREATE-INDEX time (rows land via the populate step or CDC), so no DELETE before clone is needed. Async fulltext is skipped at the whole-index level via SyncDescriptor, not per table.

func (CatalogHooks) BuildSessionVars

func (CatalogHooks) BuildSessionVars() []string

BuildSessionVars — fulltext's tokenizing build reads no algorithm-specific session vars and has no experimental flag; persist only the basic lower_case_table_names (table-name resolution in the rebuild SQL). BuildSessionVars returns nil — fulltext captures no session vars into algo_params, keeping its algo_params byte-compatible with pre-session_vars indexes.

func (CatalogHooks) DefaultOptions

func (CatalogHooks) DefaultOptions() map[string]string

DefaultOptions — fulltext defaults are inferred at build time; no statement-level option JSON is required when the WITH(...) clause is omitted. Matches the legacy catalog.IndexParamsToJsonString path returning "" for an empty option map.

func (CatalogHooks) ExperimentalFlag

func (CatalogHooks) ExperimentalFlag() string

ExperimentalFlag — `experimental_fulltext_index` exists at pkg/frontend/variables.go but is not enforced anywhere today. Returning "" preserves that behavior.

func (CatalogHooks) HiddenTableTypes

func (CatalogHooks) HiddenTableTypes() []string

HiddenTableTypes — fulltext uses a single hidden table holding (doc_id, pos, word) rows clustered by word.

func (CatalogHooks) ParamsFromTree

func (CatalogHooks) ParamsFromTree(_ *tree.Index) (map[string]string, error)

ParamsFromTree — fulltext parses to *tree.FullTextIndex, not *tree.Index, so this hook is never reached for fulltext in practice. The fulltext-specific parser lives at pkg/fulltext/plugin/plan/schema.go::buildFullTextParams and is invoked from BuildFullTextIndexDefs.

func (CatalogHooks) RestoreBehavior

func (h CatalogHooks) RestoreBehavior() catalogplugin.RestoreBehavior

RestoreBehavior — CreateTable populates fulltext's inverted-index hidden table inline for a sync index (CROSS APPLY fulltext_index_tokenize), and the restore's block-level clone APPENDS, so it must be emptied with DELETE … WHERE TRUE before the clone re-supplies it — DeleteBeforeClone is the hidden table. (For an async index the table is empty at CreateTable, so the delete is a harmless no-op.) The compile hook's RestoreInitSQL returns "" — no reindex; clone + CDC catch-up rebuild it.

func (CatalogHooks) ShouldTruncateHiddenTable

func (CatalogHooks) ShouldTruncateHiddenTable(_ string) bool

ShouldTruncateHiddenTable — fulltext has no preserved-across-truncate state; the single hidden table is rebuilt from source rows.

func (CatalogHooks) SupportedIncludeColumnTypes

func (CatalogHooks) SupportedIncludeColumnTypes() []types.T

SupportedOpTypes — fulltext has no metric/op-type concept. SupportedIncludeColumnTypes: this index has no INCLUDE-column support.

func (CatalogHooks) SupportedOpTypes

func (CatalogHooks) SupportedOpTypes() map[string]string

func (CatalogHooks) SupportedPrimaryKeyTypes

func (CatalogHooks) SupportedPrimaryKeyTypes() []types.T

SupportedPrimaryKeyTypes: fulltext imposes no PK-type constraint.

func (CatalogHooks) SupportedVectorTypes

func (CatalogHooks) SupportedVectorTypes() []types.T

SupportedVectorTypes: fulltext has no vector column.

func (CatalogHooks) SyncDescriptor

func (CatalogHooks) SyncDescriptor() catalogplugin.SyncDescriptor

SyncDescriptor — fulltext participates in ISCP CDC when the index is async (per the Async param in IndexAlgoParams). No idxcron action today, matching the legacy inline behaviour.

Jump to

Keyboard shortcuts

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