|
31 | 31 | import io.lettuce.core.api.async.RedisStringAsyncCommands; |
32 | 32 | import io.lettuce.core.cluster.RedisClusterClient; |
33 | 33 | import io.lettuce.core.cluster.api.StatefulRedisClusterConnection; |
| 34 | +import org.apache.calcite.sql.JoinType; |
34 | 35 | import org.apache.flink.api.java.typeutils.RowTypeInfo; |
35 | 36 | import org.apache.flink.calcite.shaded.com.google.common.collect.Lists; |
36 | 37 | import org.apache.flink.calcite.shaded.com.google.common.collect.Maps; |
@@ -124,15 +125,11 @@ public void asyncInvoke(Row input, ResultFuture<Row> resultFuture) throws Except |
124 | 125 | Integer conValIndex = sideInfo.getEqualValIndex().get(i); |
125 | 126 | Object equalObj = input.getField(conValIndex); |
126 | 127 |
|
127 | | - String value = ""; |
128 | | - |
129 | 128 | if(equalObj == null){ |
130 | | - resultFuture.complete(null); |
131 | | - value = "null"; |
132 | | - } else { |
133 | | - value = equalObj.toString(); |
| 129 | + dealMissKey(input, resultFuture); |
| 130 | + return; |
134 | 131 | } |
135 | | - |
| 132 | + String value = equalObj.toString(); |
136 | 133 | keyData.add(sideInfo.getEqualFieldList().get(i)); |
137 | 134 | keyData.add(value); |
138 | 135 | } |
@@ -165,8 +162,7 @@ public void asyncInvoke(Row input, ResultFuture<Row> resultFuture) throws Except |
165 | 162 | List<String> value = async.keys(key + ":*").get(); |
166 | 163 | String[] values = value.toArray(new String[value.size()]); |
167 | 164 | if (values.length == 0){ |
168 | | - Row row = fillData(input, null); |
169 | | - resultFuture.complete(Collections.singleton(row)); |
| 165 | + dealMissKey(input, resultFuture); |
170 | 166 | } else { |
171 | 167 | RedisFuture<List<KeyValue<String, String>>> future = ((RedisStringAsyncCommands) async).mget(values); |
172 | 168 | future.thenAccept(new Consumer<List<KeyValue<String, String>>>() { |
|
0 commit comments