gaurav726 commented on a change in pull request #17754:
URL: https://github.com/apache/flink/pull/17754#discussion_r749317372



##########
File path: 
flink-connectors/flink-connector-jdbc/src/main/java/org/apache/flink/connector/jdbc/table/JdbcRowDataLookupFunction.java
##########
@@ -146,10 +148,12 @@ public void eval(Object... keys) {
         if (cache != null) {
             List<RowData> cachedRows = cache.getIfPresent(keyRow);
             if (cachedRows != null) {
-                for (RowData cachedRow : cachedRows) {
-                    collect(cachedRow);
+                if (!cachedRows.isEmpty() || !excludeEmptyQueryResult) {
+                    for (RowData cachedRow : cachedRows) {

Review comment:
       Hi @wenlong88, code changes has been done, but for test case, I have a 
doubt, If you look at JdbcRowDataLookupFunctionTest#testEval, it test for 
collector, but for my use case, output will never get collected in collector, 
Also there is no getter for cache for which i can assert, should I put a getter 
for cache in this class, can you please help me with test case for it




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


Reply via email to