Minor refactor to LocalQueryRunner
Make UnsupportedRemoteSourceFactory as a explicit inner static class
(instead of an anonymous class) to make the LocalExecutionPlanner#plan
call more concise in LocalQueryRunner.
@@ -817,20 +817,7 @@ public class LocalQueryRunner
subplan.getFragment().getTableScanSchedulingOrder(),
outputFactory,
Optional.empty(),
- new RemoteSourceFactory()
- {
- @Override
- public SourceOperatorFactory createRemoteSource(Session session, int operatorId, PlanNodeId planNodeId, List<Type> types)
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public SourceOperatorFactory createMergeRemoteSource(Session session, int operatorId, PlanNodeId planNodeId, List<Type> types, List<Integer> outputChannels, List<Integer> sortChannels, List<SortOrder> sortOrder)
- {
- throw new UnsupportedOperationException();
- }
- },
+ new UnsupportedRemoteSourceFactory(),
createTableWriteInfo(streamingSubPlan, metadata, session),
false);
@@ -984,4 +971,20 @@ public class LocalQueryRunner
.where(TableScanNode.class::isInstance)
.findAll();
}
+
+ private static class UnsupportedRemoteSourceFactory
+ implements RemoteSourceFactory
+ {
+ @Override
+ public SourceOperatorFactory createRemoteSource(Session session, int operatorId, PlanNodeId planNodeId, List<Type> types)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public SourceOperatorFactory createMergeRemoteSource(Session session, int operatorId, PlanNodeId planNodeId, List<Type> types, List<Integer> outputChannels, List<Integer> sortChannels, List<SortOrder> sortOrder)
+ {
+ throw new UnsupportedOperationException();
+ }
+ }
}
