MaxSpeer commented on code in PR #699:
URL: https://github.com/apache/wayang/pull/699#discussion_r2946002614
##########
wayang-platforms/wayang-jdbc-template/src/main/java/org/apache/wayang/jdbc/execution/JdbcExecutor.java:
##########
@@ -170,21 +172,22 @@ protected static Tuple2<String, SqlQueryChannel.Instance>
createSqlQuery(final E
// Extract the different types of ExecutionOperators from the stage.
final JdbcTableSource tableOp = (JdbcTableSource)
startTask.getOperator();
SqlQueryChannel.Instance tipChannelInstance =
JdbcExecutor.instantiateOutboundChannel(startTask, context, jdbcExecutor);
- final Collection<JdbcFilterOperator> filterTasks = new ArrayList<>(4);
+ final Collection<JdbcExecutionOperator> filterTasks = new
ArrayList<>(4);
JdbcProjectionOperator projectionTask = null;
- final Collection<JdbcJoinOperator<?>> joinTasks = new ArrayList<>();
+ final Collection<JdbcExecutionOperator> joinTasks = new ArrayList<>();
final Set<ExecutionTask> allTasks = stage.getAllTasks();
assert allTasks.size() <= 3;
ExecutionTask nextTask =
JdbcExecutor.findJdbcExecutionOperatorTaskInStage(startTask, stage);
while (nextTask != null) {
// Evaluate the nextTask.
- if (nextTask.getOperator() instanceof final JdbcFilterOperator
filterOperator) {
- filterTasks.add(filterOperator);
- } else if (nextTask.getOperator() instanceof
JdbcProjectionOperator projectionOperator) {
+ final var operator = nextTask.getOperator();
+ if (operator instanceof JdbcFilterOperator || operator instanceof
SpatialFilterOperator) {
Review Comment:
The JdbcSpatialOperator is located in the Spatial Plugin and we don't want
to introduce this dependency. The findJdbcExecutionOperatorTaskInStage()
function ensures that only Jdbc Operators are selected. For consistency we
could change the other JDBC operators to their wayang operators (e.g.
JdbcFilterOperator -> FilterOperator)
--
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]