treyfel commented on code in PR #652:
URL: https://github.com/apache/wayang/pull/652#discussion_r2669348053
##########
wayang-platforms/wayang-jdbc-template/src/main/java/org/apache/wayang/jdbc/operators/JdbcJoinOperator.java:
##########
@@ -73,7 +73,7 @@ public String createSqlClause(Connection connection,
FunctionCompiler compiler)
final String rightTableName = right.field0;
final String rightKey = right.field1;
- return "JOIN " + leftTableName + " ON " +
+ return "JOIN " + rightTableName + " ON " +
Review Comment:
Hi! So previously the sql clause created would be a self join, which I
assume was not intended. In `JdbcExecutor.createSqlString` the sql string is
built. In line 217 in `JdbcExecutor`, we create a clause such as _"SELECT *
FROM testA"_ as in the test there is no projection.
Then we add _"JOIN testA ON testB.a=testA.a;"_ in line 221 using the
`JdbcJoinOperator.createSqlClause().` The change intends to address this issue
by making the `JdbcJoinOperator.createSqlClause()` not reference the same table
as in the selection but rather the other table.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]