mpp

package
v6.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package mpp is what the analytical workloads share about Greenplum-family engines (Greenplum, Greengage, WarehousePG, Apache Cloudberry): the dialect name and the check that keeps a run on the dialect that matches the server it is connected to.

These engines speak the PostgreSQL protocol, so the pg driver runs them, and the pg schema loads and answers queries on them too. It is not the schema they are meant to run: without DISTRIBUTED BY every table is spread by its first column and every join moves data, so the numbers would be neither representative nor comparable. Neither a missing nor a wrong dialect is therefore ever accepted silently.

Index

Constants

View Source
const Dialect = "gp"

Dialect is the value of the sql-dialect parameter that selects the MPP schema.

Variables

View Source
var (
	ErrDriver = errors.New("sql-dialect needs the pg driver: Greenplum-family engines speak the PostgreSQL wire")
	ErrSchema = errors.New("sql-dialect gp brings its own schema; do not combine it with a schema override")
	ErrUnlog  = errors.New("pg-unlogged does not apply to sql-dialect gp: Greenplum has no unlogged tables")
	ErrNeedGP = errors.New("the server is a Greenplum-family MPP engine: run with --sql-dialect gp " +
		"(the pg dialect declares no distribution or storage for its tables)")
	ErrNotGP = errors.New("--sql-dialect gp needs a Greenplum-family server: " +
		"this one has no pg_catalog.gp_segment_configuration")
)

Functions

This section is empty.

Types

type Request

type Request struct {
	Dialect   string
	Driver    bench.DriverTypeName
	OwnSchema bool // the author supplies the schema SQL, so the built-in one is not used
	Unlogged  bool // pg-unlogged given
}

Request is what a workload knows when it picks its dialect.

type Selection

type Selection struct {
	// contains filtered or unexported fields
}

Selection is the dialect a run uses and, where it can be checked, the server check.

func Select

func Select(r Request) (*Selection, error)

Select validates a dialect request at definition time, before any statement runs. noop and recording stand in for the pg driver in dry runs and tests.

func (*Selection) GP

func (s *Selection) GP() bool

GP reports whether the MPP schema is selected.

func (*Selection) Step

func (s *Selection) Step(action bench.Action) bench.Action

Step wraps a step so the server is checked before the first statement of the run, whichever steps the run selects. The check runs once; every step sees its result.

Jump to

Keyboard shortcuts

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