You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/13 06:33:14 UTC

[GitHub] [flink-table-store] JingsongLi commented on a diff in pull request #154: [hotfix] ALTER TABLE COMPACT should also use restored max level

JingsongLi commented on code in PR #154:
URL: https://github.com/apache/flink-table-store/pull/154#discussion_r895367509


##########
flink-table-store-core/src/main/java/org/apache/flink/table/store/file/operation/FileStoreWriteImpl.java:
##########
@@ -149,7 +149,7 @@ public RecordWriter createCompactWriter(
             ExecutorService compactExecutor,
             List<DataFileMeta> restoredFiles) {
         return new CompactWriter(
-                CompactUnit.fromFiles(options.numLevels - 1, restoredFiles),
+                CompactUnit.fromFiles(getRestoreMaxLevel(restoredFiles) - 1, restoredFiles),

Review Comment:
   We can use `Levels` to produce `CompactUnit` by `CompactUnit.fromLevelRuns`.
   In this way, we don't need to change `Levels`.
   And we should add a test case here.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org