conformance

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: Apache-2.0 Imports: 10 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 conformance is the suite every engine adapter must pass unchanged (#20): fake now, Trino and the direct engines as they land.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(t *testing.T, newEngine func(t *testing.T) queryengine.Engine, fx Fixtures)

Run runs the suite. newEngine returns a fresh instance each call; the cross-process cancel case uses two. Engines are tested as the backend sees them: behind queryengine.Guard, with no read-only credentials assertion.

Types

type Fixtures

type Fixtures struct {
	TypesSQL string
	Types    []TypeCase

	ZeroRowsSQL    string
	MultiResultSQL string // optional: a statement with two result sets

	// SetStateSQL sets session state; ReadStateSQL reads it back as one string
	// value equal to StateValue, and returns no row (or a null) on a new
	// session.
	SetStateSQL, ReadStateSQL, StateValue string

	// Transaction case (when Capabilities.Transactions): Begin, Insert, then
	// Count returns one more row in the session; a new session after Close
	// sees the old count.
	BeginSQL, InsertSQL, CountSQL string

	ReadSQL  string // allowed in a read-only session
	WriteSQL string // refused in a read-only session

	SleepSQL string // runs until cancelled

	SyntaxErrorSQL  string
	MissingTableSQL string

	ManyRowsSQL string // returns more than CollectCap rows
	CollectCap  int64

	// Introspection (when the engine has an Introspector): this table and
	// columns must be listed.
	IntrospectCatalog string
	IntrospectSchema  []string
	IntrospectTable   string
	IntrospectColumns []string
}

Fixtures are the engine's spellings of each case. Optional cases run only when their fields are set (and the capability allows).

type TypeCase

type TypeCase struct {
	Column string
	Type   arrow.DataType
	// Value is the first row's value as arrow's Array.ValueStr renders it.
	Value string
	// Skip marks a type the engine does not have.
	Skip bool
}

TypeCase is one column of Fixtures.TypesSQL.

Jump to

Keyboard shortcuts

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