Jzjsnow commented on code in PR #3776:
URL: https://github.com/apache/amoro/pull/3776#discussion_r2544797917


##########
amoro-ams/src/main/java/org/apache/amoro/server/scheduler/inline/TableRuntimeRefreshExecutor.java:
##########
@@ -115,7 +116,11 @@ public void execute(TableRuntime tableRuntime) {
                       != defaultTableRuntime.getCurrentChangeSnapshotId()))
           || (mixedTable.isUnkeyedTable()
               && lastOptimizedSnapshotId != 
defaultTableRuntime.getCurrentSnapshotId())) {
-        tryEvaluatingPendingInput(defaultTableRuntime, mixedTable);
+        if 
(!defaultTableRuntime.getOptimizingConfig().isEventBasedTriggerEnabled()
+            || MetricBasedRefreshEvent.isEvaluatingPendingInputNecessary(

Review Comment:
   Good call! In the latest commit, I've optimized the process to eliminate 
extra full table scans:
   - Before `tryEvaluatingPendingInput`, we only judge based on the table's 
average file size and number of delete files.
   - During `tryEvaluatingPendingInput`, MSE metrics are then calculated during 
the table scan.
   
   We've also checked the metric-based trigger enabled in the 
`RuntimeRefeshExecutor` at the beginning, 



-- 
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