Skip to content

Commit 1703b02

Browse files
修竹修竹
authored andcommitted
解决redis维表内连接的bug
1 parent eb6e7e2 commit 1703b02

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

redis5/redis5-side/redis-async-side/src/main/java/com/dtstack/flink/sql/side/redis/RedisAsyncReqRow.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import io.lettuce.core.api.async.RedisStringAsyncCommands;
3232
import io.lettuce.core.cluster.RedisClusterClient;
3333
import io.lettuce.core.cluster.api.StatefulRedisClusterConnection;
34+
import org.apache.calcite.sql.JoinType;
3435
import org.apache.flink.api.java.typeutils.RowTypeInfo;
3536
import org.apache.flink.calcite.shaded.com.google.common.collect.Lists;
3637
import org.apache.flink.calcite.shaded.com.google.common.collect.Maps;
@@ -165,6 +166,9 @@ public void asyncInvoke(Row input, ResultFuture<Row> resultFuture) throws Except
165166
List<String> value = async.keys(key + ":*").get();
166167
String[] values = value.toArray(new String[value.size()]);
167168
if (values.length == 0){
169+
if (sideInfo.getJoinType() != JoinType.LEFT) {
170+
return;
171+
}
168172
Row row = fillData(input, null);
169173
resultFuture.complete(Collections.singleton(row));
170174
} else {

0 commit comments

Comments
 (0)