liming30 commented on code in PR #3297:
URL: https://github.com/apache/paimon/pull/3297#discussion_r1609214035
##########
paimon-flink/paimon-flink-common/src/main/java/org/apache/paimon/flink/lookup/FullCacheLookupTable.java:
##########
@@ -91,7 +110,20 @@ public FullCacheLookupTable(Context context) {
this.userDefinedSeqComparator = null;
this.appendUdsFieldNumber = 0;
}
+
+ Options options = Options.fromMap(context.table.options());
this.projectedType = projectedType;
+ this.refreshAsync = options.get(LOOKUP_REFRESH_ASYNC);
+ this.refreshExecutor =
+ this.refreshAsync
+ ? Executors.newSingleThreadExecutor(
+ new ExecutorThreadFactory(
+ String.format(
+ "%s-lookup-refresh",
+
Thread.currentThread().getName())))
+ : null;
Review Comment:
We can use `MoreExecutors.newDirectExecutorService()`, which can unify the
code about `refreshExecutor` without having to judge whether it is `null` or
`refreshAsync`.
--
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]