|
46 | 46 | import org.apache.calcite.sql.parser.SqlParserPos; |
47 | 47 | import org.apache.commons.collections.CollectionUtils; |
48 | 48 | import org.apache.flink.api.common.typeinfo.TypeInformation; |
| 49 | +import org.apache.flink.api.java.functions.KeySelector; |
49 | 50 | import org.apache.flink.api.java.tuple.Tuple2; |
50 | 51 | import org.apache.flink.api.java.typeutils.RowTypeInfo; |
51 | 52 | import com.google.common.collect.HashBasedTable; |
|
58 | 59 | import org.slf4j.Logger; |
59 | 60 | import org.slf4j.LoggerFactory; |
60 | 61 |
|
| 62 | +import java.io.Serializable; |
61 | 63 | import java.util.*; |
| 64 | +import java.util.stream.Collectors; |
62 | 65 |
|
63 | 66 | import static org.apache.calcite.sql.SqlKind.*; |
64 | 67 |
|
@@ -743,12 +746,12 @@ private void joinFun(Object pollObj, Map<String, Table> localTableCache, |
743 | 746 | DataStream adaptStream = tableEnv.toRetractStream(targetTable, org.apache.flink.types.Row.class) |
744 | 747 | .map((Tuple2<Boolean, Row> f0) -> { return f0.f1; }) |
745 | 748 | .returns(Row.class); |
| 749 | + adaptStream.getTransformation().setOutputType(leftTypeInfo); |
746 | 750 |
|
747 | 751 | //join side table before keyby ===> Reducing the size of each dimension table cache of async |
748 | 752 | if(sideTableInfo.isPartitionedJoin()){ |
749 | 753 | List<String> leftJoinColList = getConditionFields(joinInfo.getCondition(), joinInfo.getLeftTableAlias(), sideTableInfo); |
750 | | - String[] leftJoinColArr = new String[leftJoinColList.size()]; |
751 | | - leftJoinColArr = leftJoinColList.toArray(leftJoinColArr); |
| 754 | + String[] leftJoinColArr = leftJoinColList.toArray(new String[leftJoinColList.size()]); |
752 | 755 | adaptStream = adaptStream.keyBy(leftJoinColArr); |
753 | 756 | } |
754 | 757 |
|
|
0 commit comments