Skip to content

Commit ee8a25b

Browse files
author
dapeng
committed
修复 当join的左表是一个uion子句时会出现无法注册的问题
1 parent 67c2378 commit ee8a25b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

core/src/main/java/com/dtstack/flink/sql/util/TableUtils.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,13 @@ public static String dealSelectResultWithJoinInfo(JoinInfo joinInfo, SqlSelect s
225225
queueInfo.offer(joinInfo.getLeftNode());
226226
}
227227

228+
if(joinInfo.getLeftNode().getKind() == AS){
229+
SqlNode leftSqlNode = ((SqlBasicCall)joinInfo.getLeftNode()).getOperands()[0];
230+
if (leftSqlNode.getKind() == UNION){
231+
queueInfo.offer(joinInfo.getLeftNode());
232+
}
233+
}
234+
228235
queueInfo.offer(joinInfo);
229236
} else {
230237
//Determining right is not a simple table

0 commit comments

Comments
 (0)