|
iceberg-cpp
|
Base test class for metrics testing, similar to Java's TestMetrics. More...
#include <metrics_test_base.h>
Protected Member Functions | |
| virtual void | SetUp () |
| virtual Result< Metrics > | GetMetrics (std::shared_ptr< Schema > schema, std::shared_ptr<::arrow::Array > records)=0 |
| Get metrics for the given schema and records. | |
| virtual Result< Metrics > | GetMetrics (std::shared_ptr< Schema > schema, std::shared_ptr< MetricsConfig > config, std::shared_ptr<::arrow::Array > records)=0 |
| Get metrics with custom MetricsConfig. | |
| virtual std::string | CreateOutputFile ()=0 |
| Create an output file for testing. | |
| virtual Result< int > | GetSplitCount ()=0 |
| Get the number of row groups/splits in a file. | |
| virtual bool | SupportsSmallRowGroups () const |
| Whether the format supports small row groups for testing. | |
| virtual bool | ReportsNanCounts () const |
| Whether the format reports NaN counts for floating-point fields. | |
| void | AssertCounts (int field_id, std::optional< int64_t > expected_value_count, std::optional< int64_t > expected_null_count, const Metrics &metrics) |
| void | AssertCounts (int field_id, std::optional< int64_t > expected_value_count, std::optional< int64_t > expected_null_count, std::optional< int64_t > expected_nan_count, const Metrics &metrics) |
| void | AssertColumnSizeFields (std::vector< int32_t > expected_field_ids, const Metrics &metrics) |
| template<typename T > | |
| void | AssertBounds (int field_id, std::shared_ptr< PrimitiveType > type, std::optional< T > expected_lower, std::optional< T > expected_upper, const Metrics &metrics) |
| std::shared_ptr<::arrow::Array > | CreateRecordArrays (const std::shared_ptr<::arrow::Schema > &arrow_schema, const std::string &json_data) |
| void | MetricsForRepeatedValues () |
| void | MetricsForTopLevelFields () |
| void | MetricsForDecimals () |
| void | MetricsForNestedStructFields () |
| void | MetricsModeForNestedStructFields () |
| void | MetricsForListAndMapElements () |
| void | MetricsForNullColumns () |
| void | MetricsForNaNColumns () |
| void | ColumnBoundsWithNaNValueAtFront () |
| void | ColumnBoundsWithNaNValueInMiddle () |
| void | ColumnBoundsWithNaNValueAtEnd () |
| void | MetricsForTopLevelWithMultipleRowGroup () |
| void | MetricsForNestedStructFieldsWithMultipleRowGroup () |
| void | NoneMetricsMode () |
| void | CountsMetricsMode () |
| void | FullMetricsMode () |
| void | TruncateStringMetricsMode () |
| void | TruncateBinaryMetricsMode () |
Static Protected Member Functions | |
| static std::shared_ptr< Schema > | SimpleSchema () |
| static std::shared_ptr< Schema > | NestedSchema () |
| static std::shared_ptr< Schema > | FloatDoubleSchema () |
Protected Attributes | |
| std::shared_ptr< FileIO > | file_io_ |
| std::string | temp_dir_ |
| std::string | path_ |
Base test class for metrics testing, similar to Java's TestMetrics.
This class provides common test infrastructure and helper methods for testing metrics collection across different file formats (Parquet, Avro, ORC).
|
protectedpure virtual |
Create an output file for testing.
Implemented in iceberg::test::ParquetMetricsTest.
|
protectedpure virtual |
Get metrics with custom MetricsConfig.
Implemented in iceberg::test::ParquetMetricsTest.
|
protectedpure virtual |
Get metrics for the given schema and records.
Implemented in iceberg::test::ParquetMetricsTest.
|
protectedpure virtual |
Get the number of row groups/splits in a file.
Implemented in iceberg::test::ParquetMetricsTest.
|
inlineprotectedvirtual |
Whether the format reports NaN counts for floating-point fields.
Reimplemented in iceberg::test::ParquetMetricsTest.
|
inlineprotectedvirtual |
Whether the format supports small row groups for testing.
Reimplemented in iceberg::test::ParquetMetricsTest.