@Override public Pair<IOperatorDescriptor, AlgebricksPartitionConstraint> buildDatasourceScanRuntime( MetadataProvider metadataProvider, IDataSource<DataSourceId> dataSource, List<LogicalVariable> scanVariables, List<LogicalVariable> projectVariables, boolean projectPushed, List<LogicalVariable> minFilterVars, List<LogicalVariable> maxFilterVars, ITupleFilterFactory tupleFilterFactory, long outputLimit, IOperatorSchema opSchema, IVariableTypeEnvironment typeEnv, JobGenContext context, JobSpecification jobSpec, Object implConfig) throws AlgebricksException { if (tupleFilterFactory != null || outputLimit >= 0) { throw CompilationException.create(ErrorCode.COMPILATION_ILLEGAL_STATE, "tuple filter and limit are not supported by FunctionDataSource"); } GenericAdapterFactory adapterFactory = new GenericAdapterFactory(); adapterFactory.setOutputType(RecordUtil.FULLY_OPEN_RECORD_TYPE); IClusterStateManager csm = metadataProvider.getApplicationContext().getClusterStateManager(); FunctionDataSourceFactory factory = new FunctionDataSourceFactory(createFunction(metadataProvider, getLocations(csm))); adapterFactory.configure(factory); return metadataProvider.buildExternalDatasetDataScannerRuntime(jobSpec, itemType, adapterFactory); }