Flow PHP

NullDefinition implements Definition

Read onlyYes
FinalYes

The bottom of the type lattice: the column's type is not known. Absorbed by merge() in both directions - null ⊔ T = ?T, T ⊔ null = ?T, null ⊔ null = null. Reaches a materialized Schema only when a column is null in every observed row and no type was declared; that is Parquet's UNKNOWN and Iceberg's unknown. A column that holds strings and sometimes null is StringDefinition(nullable: true), never this.

Tags
implements

Interfaces

Definition

Methods

__construct()  : mixed
addMetadata()  : static
entry()  : Reference
isCompatible()  : bool
Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.
isNullable()  : bool
isSame()  : bool
makeNullable()  : static
matches()  : bool
merge()  : Definition<string|int, mixed>
metadata()  : Metadata
normalize()  : array<string, mixed>
rename()  : static
setMetadata()  : static
type()  : Type<string|int, T>

Methods

addMetadata()

public addMetadata(string $key, array<string|int, mixed>|bool|float|int|string $value) : static
Parameters
$key : string
$value : array<string|int, mixed>|bool|float|int|string
Return values
static

a new definition, the original is left untouched

isCompatible()

Checks if another type is compatible with this type. Nullability is validated from a schema evolution perspective.

public isCompatible(Definition $definition) : bool

This means that when current type is nullable and the other type is not nullable, it is still compatible. When given type is not nullable and current type is nullable, it is not compatible.

Parameters
$definition : Definition
Return values
bool

makeNullable()

public makeNullable([bool $nullable = true ]) : static
Parameters
$nullable : bool = true
Return values
static

matches()

public matches(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

normalize()

public normalize() : array<string, mixed>
Return values
array<string, mixed>

rename()

public rename(string $newName) : static
Parameters
$newName : string
Return values
static

setMetadata()

public setMetadata(Metadata $metadata) : static
Parameters
$metadata : Metadata
Return values
static

a new definition, the original is left untouched

type()

public type() : Type<string|int, T>
Return values
Type<string|int, T>
On this page

Search results