|
47 | 47 | #include "io/fs/file_writer.h" |
48 | 48 | #include "io/fs/remote_file_system.h" |
49 | 49 | #include "io/io_common.h" |
50 | | -#include "olap/collection_statistics.h" |
51 | 50 | #include "olap/cumulative_compaction.h" |
52 | 51 | #include "olap/cumulative_compaction_policy.h" |
53 | 52 | #include "olap/cumulative_compaction_time_series_policy.h" |
@@ -424,28 +423,6 @@ bool CompactionMixin::handle_ordered_data_compaction() { |
424 | 423 | if (!config::enable_ordered_data_compaction) { |
425 | 424 | return false; |
426 | 425 | } |
427 | | - |
428 | | - // If some rowsets has idx files and some rowsets has not, we can not do link file compaction. |
429 | | - // Since the output rowset will be broken. |
430 | | - |
431 | | - // Use schema version instead of schema hash to check if they are the same, |
432 | | - // because light schema change will not change the schema hash on BE, but will increase the schema version |
433 | | - // See fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeHandler.java::2979 |
434 | | - std::vector<int32_t> schema_versions_of_rowsets; |
435 | | - |
436 | | - for (auto input_rowset : _input_rowsets) { |
437 | | - schema_versions_of_rowsets.push_back(input_rowset->rowset_meta()->schema_version()); |
438 | | - } |
439 | | - |
440 | | - // If all rowsets has same schema version, then we can do link file compaction directly. |
441 | | - bool all_same_schema_version = |
442 | | - std::all_of(schema_versions_of_rowsets.begin(), schema_versions_of_rowsets.end(), |
443 | | - [&](int32_t v) { return v == schema_versions_of_rowsets.front(); }); |
444 | | - |
445 | | - if (!all_same_schema_version) { |
446 | | - return false; |
447 | | - } |
448 | | - |
449 | 426 | if (compaction_type() == ReaderType::READER_COLD_DATA_COMPACTION || |
450 | 427 | compaction_type() == ReaderType::READER_FULL_COMPACTION) { |
451 | 428 | // The remote file system and full compaction does not support to link files. |
|
0 commit comments