
Extract Hive-style partition key-value pairs from a path
Source:R/utils-hive-partitions.R
extract_hive_partitions.Rd
Given a filesystem path, this function extracts Hive-style partition
key-value pairs (i.e., path components formatted as key=value
). It supports
decoding URL-encoded values (e.g., "wk%20flu"
→ "wk flu"
), and handles
empty values (e.g., "key="
) as NA
, consistent with Hive and Arrow semantics.
Value
A named character vector where the names are partition keys and the values
are decoded values. Returns NULL
if no valid partitions are found.
Details
If strict = TRUE
, the function will abort with a detailed error message
if any malformed partition-like segments are found.