Skip to content

Commit 4700955

Browse files
committed
Merge branch 'v1.8.0_dev_bugfix_joinnpe' into 'v1.8.0_dev'
维表join npe问题 【流计算】【实时计算】维表join bug ,v1.8.0_dev也需要修改 See merge request !87
2 parents df2d178 + 9c50e44 commit 4700955

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

core/src/main/java/com/dtstack/flink/sql/side/SideSqlExec.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,8 +360,14 @@ private SqlNode replaceOrderByTableName(SqlNode orderNode, String tableAlias) {
360360
private SqlNode replaceNodeInfo(SqlNode groupNode, HashBasedTable<String, String, String> mappingTable, String tableAlias){
361361
if(groupNode.getKind() == IDENTIFIER){
362362
SqlIdentifier sqlIdentifier = (SqlIdentifier) groupNode;
363+
if(sqlIdentifier.names.size() == 1){
364+
return sqlIdentifier;
365+
}
363366
String mappingFieldName = mappingTable.get(sqlIdentifier.getComponent(0).getSimple(), sqlIdentifier.getComponent(1).getSimple());
364367

368+
if(mappingFieldName == null){
369+
throw new RuntimeException("can't find mapping fieldName:" + sqlIdentifier.toString() );
370+
}
365371
sqlIdentifier = sqlIdentifier.setName(0, tableAlias);
366372
return sqlIdentifier.setName(1, mappingFieldName);
367373
}else if(groupNode instanceof SqlBasicCall){

0 commit comments

Comments
 (0)