Partition
FinalYes
Constants
- NULL_VALUE : string = '__HIVE_DEFAULT_PARTITION__'
- A null partition value has no directory name of its own, so it borrows Hive's, which every engine that reads a Hive tree already understands.
Properties
Methods
- __construct() : mixed
- decode() : string
- encode() : string
- fromArray() : array<string|int, Partition>
- fromSegment() : null|self
- fromUri() : Partitions
- fromValue() : string
- id() : string
- segment() : string
- The `name=value` directory segment. Every path built from partitions goes through here, so the encoding on write and the decoding on read cannot drift apart.
Constants
NULL_VALUE
A null partition value has no directory name of its own, so it borrows Hive's, which every engine that reads a Hive tree already understands.
public
string
NULL_VALUE
= '__HIVE_DEFAULT_PARTITION__'
Properties
$name read-only
public
string
$name
$value read-only
public
string|null
$value
Methods
__construct()
public
__construct(string $name, string|null $value) : mixed
Parameters
- $name : string
- $value : string|null
decode()
public
static decode(string $segment) : string
Parameters
- $segment : string
Return values
stringencode()
public
static encode(string $value) : string
Parameters
- $value : string
Return values
stringfromArray()
public
static fromArray(array<string, mixed> $data) : array<string|int, Partition>
Parameters
- $data : array<string, mixed>
Return values
array<string|int, Partition>fromSegment()
public
static fromSegment(string $segment) : null|self
Parameters
- $segment : string
Return values
null|self —null when the segment is not a name=value pair at all
fromUri()
public
static fromUri(string $uri) : Partitions
Parameters
- $uri : string
Return values
PartitionsfromValue()
public
static fromValue(string $name, Type<string|int, mixed> $type, mixed $value) : string
Parameters
- $name : string
- $type : Type<string|int, mixed>
- $value : mixed
Return values
stringid()
public
id() : string
Return values
stringsegment()
The `name=value` directory segment. Every path built from partitions goes through here, so the encoding on write and the decoding on read cannot drift apart.
public
segment() : string