1996fanrui commented on code in PR #865: URL: https://github.com/apache/flink-kubernetes-operator/pull/865#discussion_r1728499330
########## flink-autoscaler-plugin-jdbc/src/main/java/org/apache/flink/autoscaler/jdbc/event/JdbcEventInteractor.java: ########## @@ -152,4 +153,29 @@ protected List<AutoScalerEvent> queryEvents(String jobKey, String reason) throws void setClock(@Nonnull Clock clock) { this.clock = Preconditions.checkNotNull(clock); } + + @Nullable + Long queryMinEventIdByCreateTime(Timestamp timestamp) throws Exception { + var sql = + "SELECT id from t_flink_autoscaler_event_handler " + + " where id = (SELECT id FROM t_flink_autoscaler_event_handler order by id asc limit 1) " + + " and create_time < ?"; Review Comment: > How about keeping it as now? of course, I'd like to updated it if needed. It's up to you, both of them are fine for me. This sql only query the first row, so the performance isn't my concern. I leave this comment because sql looks weird at first glance. -- 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-unsubscr...@flink.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org