Hi Dev,
We are working on the Join Operator in the SQL API.
After connecting the two table scans of type Record, the output slots of the
join operator is of type Tuple2.
This confuses us since we would expect the result of a join to be of type
Record. Furthermore, the projection (which happens after the join) throws the
following Exception:
Exception in thread "main" java.lang.IllegalArgumentException: Cannot connect
out@Join[2->1, id=23ad2d17] of DataSetType[BasicDataUnitType[Tuple2]] to
in@Map[1->1, id=6bce4140] of type DataSetType[BasicDataUnitType[Record]].
at
org.apache.wayang.core.plan.wayangplan.Operator.connectTo(Operator.java:206)
at
org.apache.wayang.api.sql.calcite.converter.WayangProjectVisitor.visit(WayangProjectVisitor.java:42)
at
org.apache.wayang.api.sql.calcite.converter.WayangRelConverter.convert(WayangRelConverter.java:16)
at
org.apache.wayang.api.sql.calcite.optimizer.Optimizer.convert(Optimizer.java:202)
at
org.apache.wayang.api.sql.context.SqlContext.executeSql(SqlContext.java:92)
at SqlAPI.examplePostgres(SqlAPI.java:46)
at SqlAPI.main(SqlAPI.java:77)
We tried changing the Wayang MapOperator inputTypeClass to be a Tuple2, but
this does not fix the problem.
Is there anyone that can explain why the JoinOperator outputs a Tuple2 and
perhaps also how we then connect the output of the join to the input of the
projection?
Best,
Michelle and Kristian