lxy-9602 commented on code in PR #418:
URL: https://github.com/apache/paimon-cpp/pull/418#discussion_r4179999747


##########
src/paimon/format/parquet/parquet_stats_extractor_test.cpp:
##########
@@ -362,4 +383,101 @@ TEST_F(ParquetStatsExtractorTest, 
TestExtractStatsTimestampType) {
         CheckStats(fields, data_str, expected_stats_str, 
/*expect_row_count=*/1);
     }
 }
+
+TEST_F(ParquetStatsExtractorTest, TestWrittenFileStatsAcrossRowGroups) {
+    arrow::FieldVector fields = {
+        arrow::field("f_int", arrow::int32()),
+        arrow::field("f_bigint", arrow::int64()),
+        arrow::field("f_float", arrow::float32()),
+        arrow::field("f_double", arrow::float64()),
+        arrow::field("f_string", arrow::utf8()),
+        arrow::field("f_binary", arrow::binary()),
+        arrow::field("f_decimal_int32", arrow::decimal128(9, 2)),
+        arrow::field("f_decimal_int64", arrow::decimal128(18, 4)),
+        arrow::field("f_decimal_fixed", arrow::decimal128(30, 2)),
+        arrow::field("f_ts_int96", arrow::timestamp(arrow::TimeUnit::NANO)),
+        arrow::field("f_ts_micro", arrow::timestamp(arrow::TimeUnit::MICRO)),
+        arrow::field("f_date", arrow::date32()),
+        arrow::field("f_all_null", arrow::int32()),
+        arrow::field("f_list", arrow::list(arrow::int32())),
+        arrow::field("f_struct", arrow::struct_({arrow::field("f0", 
arrow::int32())})),

Review Comment:
   Could you please add a nested map type?



##########
src/paimon/common/format/written_file_stats_provider.h:
##########
@@ -0,0 +1,47 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#pragma once
+
+#include <memory>
+
+#include "paimon/result.h"
+#include "paimon/type_fwd.h"
+
+namespace paimon {
+
+/// Implemented by a `FormatWriter` that can produce the column statistics of 
the file it has
+/// finished from the metadata it still holds in memory, so the file need not 
be reopened through
+/// `FormatStatsExtractor` to read them back.
+///
+/// The interface is internal and implemented alongside `FormatWriter`, so the 
exported
+/// `FormatWriter` keeps its ABI.
+class PAIMON_EXPORT WrittenFileStatsProvider {

Review Comment:
   It seems that `WrittenFileStatsProvider` could be placed under 
`include/paimon/format/`?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to