compile

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: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package compile implements the fulltext plugin's compile-layer (DDL) hooks.

Lifted from:

  • pkg/sql/compile/ddl_index_algo.go:132 (handleFullTextIndexTable)
  • pkg/sql/compile/util.go:528 (genInsertIndexTableSqlForFullTextIndex)
  • pkg/sql/compile/util.go:113 (insertIntoFullTextIndexTableFormat)

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Hooks

type Hooks struct{}

Hooks implements plugin/compile.Hooks for fulltext indexes.

func (Hooks) HandleCreateIndex

func (Hooks) HandleCreateIndex(ctx compileplugin.CompileContext, indexDefs map[string]*plan.IndexDef) error

HandleCreateIndex is lifted from Scope.handleFullTextIndexTable (pkg/sql/compile/ddl_index_algo.go:132). indexDefs is keyed by IndexAlgoTableType — fulltext's BuildFullTextIndexDefs sets that to the empty string (see plan/schema.go), so the map has exactly one entry under the "" key.

func (Hooks) HandleDropIndex

func (Hooks) HandleDropIndex(_ compileplugin.CompileContext, _ map[string]*plan.IndexDef) error

HandleDropIndex — no algorithm-specific cleanup beyond the generic hidden-table deletion the SQL layer already performs.

func (Hooks) HandleReindex

func (Hooks) HandleReindex(_ compileplugin.CompileContext, _ map[string]*plan.IndexDef, _ bool) error

HandleReindex — fulltext does not support ALTER … REINDEX.

func (Hooks) IdxcronMetadata

func (Hooks) IdxcronMetadata(_ compileplugin.CompileContext) ([]byte, error)

IdxcronMetadata — fulltext has no idxcron action (SyncDescriptor().IdxcronAction == ""); this is never invoked.

func (Hooks) RestoreInitSQL

func (Hooks) RestoreInitSQL(_ compileplugin.CompileContext, _ map[string]*plan.IndexDef) (bool, string, error)

RestoreInitSQL — fulltext has no compact model to rebuild; the clone copies the inverted-index hidden table and the CDC catch-up handles incremental changes. Register the CDC with startFromNow=true so its watermark is the post-clone TS (not the snapshot TS), avoiding a replay of the already-cloned rows. A non-empty InitSQL is required for startFromNow to be honored, so hand it a no-op "SELECT 1".

func (Hooks) ValidateReindexParams

func (Hooks) ValidateReindexParams(old map[string]string, _ compileplugin.ReindexParamUpdate) (map[string]string, error)

ValidateReindexParams — no-op; fulltext has no reindex-time params.

Jump to

Keyboard shortcuts

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