|
|
static Status | ValidateCommitProperties (const std::unordered_map< std::string, std::string > &properties) |
| |
| static bool | PropertyAsBoolean (const std::unordered_map< std::string, std::string > &properties, std::string_view key, bool default_value) |
| | Read a boolean property from a property map.
|
| |
| static std::optional< bool > | PropertyAsOptionalBoolean (const std::unordered_map< std::string, std::string > &properties, std::string_view key) |
| | Read a boolean property that may be unset.
|
| |
◆ PropertyAsBoolean()
| static bool iceberg::PropertyUtil::PropertyAsBoolean |
( |
const std::unordered_map< std::string, std::string > & |
properties, |
|
|
std::string_view |
key, |
|
|
bool |
default_value |
|
) |
| |
|
static |
Read a boolean property from a property map.
Mirrors Java's PropertyUtil.propertyAsBoolean: the value is parsed with StringUtils::ParseBoolean, so anything that is not "true" ignoring case reads as false rather than being rejected.
- Parameters
-
| properties | The property map to read from. |
| key | The property key. |
| default_value | Returned when the property is absent. |
- Returns
- The parsed value, or default_value if the property is absent.
◆ PropertyAsOptionalBoolean()
| static std::optional< bool > iceberg::PropertyUtil::PropertyAsOptionalBoolean |
( |
const std::unordered_map< std::string, std::string > & |
properties, |
|
|
std::string_view |
key |
|
) |
| |
|
static |
Read a boolean property that may be unset.
Like PropertyAsBoolean, but returns std::nullopt when the property is absent so callers can distinguish an unset property from an explicit "false". Mirrors Java's PropertyUtil.propertyAsNullableBoolean.
- Parameters
-
| properties | The property map to read from. |
| key | The property key. |
- Returns
- The parsed value, or std::nullopt if the property is absent.
The documentation for this class was generated from the following file: