Skip to content

Commit 6533361

Browse files
committed
合并重复的条件代码
1 parent 669e4b1 commit 6533361

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -461,10 +461,7 @@ private Set<String> extractSelectFieldFromJoinCondition(Set<Tuple2<String, Strin
461461
*/
462462
private void extractJoinField(SqlNode condition, Set<Tuple2<String, String>> joinFieldSet){
463463
SqlKind joinKind = condition.getKind();
464-
if( joinKind == AND ){
465-
extractJoinField(((SqlBasicCall)condition).operands[0], joinFieldSet);
466-
extractJoinField(((SqlBasicCall)condition).operands[1], joinFieldSet);
467-
}else if( joinKind == EQUALS ){
464+
if( joinKind == AND || joinKind == EQUALS ){
468465
extractJoinField(((SqlBasicCall)condition).operands[0], joinFieldSet);
469466
extractJoinField(((SqlBasicCall)condition).operands[1], joinFieldSet);
470467
}else{

0 commit comments

Comments
 (0)