28#include <unordered_map>
29#include <unordered_set>
41 enum class Kind : uint8_t {
54 std::variant<std::monostate, int32_t> length;
66 static const std::shared_ptr<MetricsConfig>&
Default();
75 std::unordered_map<std::string, std::string> properties);
86 const std::unordered_map<std::string, std::string>& updates,
const Schema& schema);
95 std::unordered_map<std::string, MetricsMode, StringHash, StringEqual>;
113 ColumnModeMap column_modes_;
Configuration for collecting column metrics for an Iceberg table.
Definition metrics_config.h:63
MetricsMode ColumnMode(std::string_view column_name) const
Get the metrics mode for a specific column.
static Status VerifyReferencedColumns(const std::unordered_map< std::string, std::string > &updates, const Schema &schema)
Verify that all referenced columns are valid.
static Result< std::shared_ptr< MetricsConfig > > Make(const Table &table)
Creates a metrics config from a table.
static const std::shared_ptr< MetricsConfig > & Default()
Get the default metrics config.
static Result< std::shared_ptr< MetricsConfig > > Make(std::unordered_map< std::string, std::string > properties)
Creates a metrics config from properties (for testing)
static Result< std::unordered_set< int32_t > > LimitFieldIds(const Schema &schema, int32_t limit)
Get limit num of primitive field ids from schema.
A schema for a Table.
Definition schema.h:51
A sort order for a table.
Definition sort_order.h:43
Table properties for Iceberg tables.
Definition table_properties.h:40
Represents an Iceberg table.
Definition table.h:41
Define symbol visibility macros for core Iceberg APIs.
Core Apache Iceberg C++ APIs.
Definition arrow_io_util.h:33
@ kTruncate
Value truncated to width W
std::expected< T, E > Result
Result alias.
Definition result.h:88
Define Result, Status, and error helpers.
Provide string utility helpers.
Definition metrics_config.h:39
int32_t TruncateLength() const
Get the truncate length from this MetricsMode.