You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Enhanced WayangMultiConditionJoinVisitor with SQL implementation
- Updated JdbcJoinOperator to generate AND clauses for multi-column joins
- Added test coverage for multi-condition join SQL generation
- Maintains backward compatibility with single-condition joins
Copy file name to clipboardExpand all lines: wayang-api/wayang-api-sql/src/main/java/org/apache/wayang/api/sql/calcite/converter/WayangMultiConditionJoinVisitor.java
Copy file name to clipboardExpand all lines: wayang-platforms/wayang-jdbc-template/src/main/java/org/apache/wayang/jdbc/operators/JdbcJoinOperator.java
+29-5Lines changed: 29 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -69,13 +69,37 @@ public String createSqlClause(Connection connection, FunctionCompiler compiler)
69
69
finalTuple<String, String> left = this.keyDescriptor0.getSqlImplementation();
70
70
finalTuple<String, String> right = this.keyDescriptor1.getSqlImplementation();
71
71
finalStringleftTableName = left.field0;
72
-
finalStringleftKey = left.field1;
72
+
finalStringleftKeys = left.field1;
73
73
finalStringrightTableName = right.field0;
74
-
finalStringrightKey = right.field1;
74
+
finalStringrightKeys = right.field1;
75
75
76
-
return"JOIN " + rightTableName + " ON " +
77
-
rightTableName + "." + rightKey
78
-
+ "=" + leftTableName + "." + leftKey;
76
+
if (leftKeys.contains(",") && rightKeys.contains(",")) {
Copy file name to clipboardExpand all lines: wayang-platforms/wayang-jdbc-template/src/test/java/org/apache/wayang/jdbc/operators/JdbcJoinOperatorTest.java
0 commit comments