Skip to content

Commit 01e3f1e

Browse files
authored
apacheGH-45578: [C++] Use max not min in MakeStatisticsArrayMaxApproximate test (apache#45579)
### Rationale for this change The test was written for min instead of max. ### What changes are included in this PR? Use max not min for MaxApproximate test case. ### Are these changes tested? Yes, by dedicated unit tests. ### Are there any user-facing changes? No * GitHub Issue: apache#45578 Authored-by: arash andishgar <arashandishgar1@gmail.com> Signed-off-by: Sutou Kouhei <kou@clear-code.com>
1 parent 288a431 commit 01e3f1e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

cpp/src/arrow/record_batch_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1398,7 +1398,7 @@ TEST_F(TestRecordBatch, MakeStatisticsArrayMaxApproximate) {
13981398
auto no_statistics_array = ArrayFromJSON(boolean(), "[true, false, true]");
13991399
auto float64_array_data = ArrayFromJSON(float64(), "[1.0, null, -1.0]")->data()->Copy();
14001400
float64_array_data->statistics = std::make_shared<ArrayStatistics>();
1401-
float64_array_data->statistics->min = -1.0;
1401+
float64_array_data->statistics->max = 1.0;
14021402
auto float64_array = MakeArray(std::move(float64_array_data));
14031403
auto batch = RecordBatch::Make(schema, float64_array->length(),
14041404
{no_statistics_array, float64_array});
@@ -1412,13 +1412,13 @@ TEST_F(TestRecordBatch, MakeStatisticsArrayMaxApproximate) {
14121412
ARROW_STATISTICS_KEY_ROW_COUNT_EXACT,
14131413
},
14141414
{
1415-
ARROW_STATISTICS_KEY_MIN_VALUE_APPROXIMATE,
1415+
ARROW_STATISTICS_KEY_MAX_VALUE_APPROXIMATE,
14161416
}},
14171417
{{
14181418
ArrayStatistics::ValueType{int64_t{3}},
14191419
},
14201420
{
1421-
ArrayStatistics::ValueType{-1.0},
1421+
ArrayStatistics::ValueType{1.0},
14221422
}}));
14231423
AssertArraysEqual(*expected_statistics_array, *statistics_array, true);
14241424
}

0 commit comments

Comments
 (0)