Skip to content

Commit cdbe4e2

Browse files
committed
Initial test fixes that require more work
1 parent d8c87c5 commit cdbe4e2

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

cpp/src/parquet/statistics.cc

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,11 @@ CleanStatistic(std::pair<T, T> min_max, LogicalType::Type::type) {
336336
return min_max;
337337
}
338338

339+
optional<std::pair<Int96, Int96>> CleanStatistic(std::pair<Int96, Int96> min_max,
340+
LogicalType::Type::type) {
341+
return min_max;
342+
}
343+
339344
// In case of floating point types, the following rules are applied (as per
340345
// upstream parquet-mr):
341346
// - If any of min/max is NaN, return nothing.
@@ -991,6 +996,8 @@ std::shared_ptr<Comparator> DoMakeComparator(Type::type physical_type,
991996
default:
992997
ParquetException::NYI("Unsigned Compare not implemented");
993998
}
999+
} else if (SortOrder::UNKNOWN == sort_order) {
1000+
return nullptr;
9941001
} else {
9951002
throw ParquetException("UNKNOWN Sort Order");
9961003
}
@@ -1104,6 +1111,7 @@ std::shared_ptr<Statistics> Statistics::Make(
11041111
MAKE_STATS(BOOLEAN, BooleanType);
11051112
MAKE_STATS(INT32, Int32Type);
11061113
MAKE_STATS(INT64, Int64Type);
1114+
MAKE_STATS(INT96, Int96Type);
11071115
MAKE_STATS(FLOAT, FloatType);
11081116
MAKE_STATS(DOUBLE, DoubleType);
11091117
MAKE_STATS(BYTE_ARRAY, ByteArrayType);

cpp/src/parquet/statistics_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ TEST(Comparison, UnknownSortOrder) {
296296
ConvertedType::INTERVAL, 12);
297297
ColumnDescriptor descr(node, 0, 0);
298298

299-
ASSERT_THROW(Comparator::Make(&descr), ParquetException);
299+
ASSERT_EQ(Comparator::Make(&descr), nullptr);
300300
}
301301

302302
// ----------------------------------------------------------------------

0 commit comments

Comments
 (0)