
Check whether a path contains Hive-style partitioning
Source:R/utils-hive-partitions.R
is_hive_partitioned_path.Rd
This function checks if a given file or directory path includes one or more
Hive-style partition segments (i.e., subdirectories formatted as key=value
).
This function can operate in a strict or lenient mode, depending on whether
you want to catch malformed partition-like segments.
Value
A logical value: TRUE
if the path contains one or more valid Hive-style
partition segments, FALSE
otherwise.
Details
A valid partition segment must:
Contain an equals sign (
=
)Have a non-empty key before the equals sign
May have an empty value (interpreted as
NA
in most Hive/Arrow contexts)
In strict mode, the function validates that all key=value
segments are well-formed
and will abort if any are not.
See also
extract_hive_partitions()
to extract key-value pairs from Hive-style paths.