@Test public void testFitStreamTable() { Long id = MLEnvironmentFactory.getNewMLEnvironmentId(); MLEnvironment env = MLEnvironmentFactory.get(id); DataStream<Integer> input= env.getStreamExecutionEnvironment().fromElements(1, 2, 3); Table table = env.getStreamTableEnvironment().fromDataStream(input); FakeEstimator estimator = new FakeEstimator(); estimator.setMLEnvironmentId(id); estimator.fit(env.getStreamTableEnvironment(), table); Assert.assertFalse(estimator.batchFitted); Assert.assertTrue(estimator.streamFitted); }
@Override public M fit(TableEnvironment tEnv, Table input) { Preconditions.checkArgument(input != null, "Input CAN NOT BE null!"); Preconditions.checkArgument( tableEnvOf(input) == tEnv, "The input table is not in the specified table environment."); return fit(input); }
EstimatorBase extends PipelineStageBase<E> implements Estimator<E, M> { @Override public M fit(TableEnvironment tEnv, Table input) { Preconditions.checkArgument(input != null, "Input CAN NOT BE null!"); Preconditions.checkArgument( tableEnvOf(input) == tEnv, "The input table is not in the specified table environment."); return fit(input); } }
EstimatorBase extends PipelineStageBase<E> implements Estimator<E, M> { @Override public M fit(TableEnvironment tEnv, Table input) { Preconditions.checkArgument(input != null, "Input CAN NOT BE null!"); Preconditions.checkArgument( tableEnvOf(input) == tEnv, "The input table is not in the specified table environment."); return fit(input); } EstimatorBase();  EstimatorBase(Params params); }
EstimatorBase extends PipelineStageBase<E> implements Estimator<E, M> { @Override public M fit(TableEnvironment tEnv, Table input) { Preconditions.checkArgument(input != null, "Input CAN NOT BE null!"); Preconditions.checkArgument( tableEnvOf(input) == tEnv, "The input table is not in the specified table environment."); return fit(input); } EstimatorBase();  EstimatorBase(Params params); @Override M fit(TableEnvironment tEnv, Table input); M fit(Table input); abstract M fit(BatchOperator input); M fit(StreamOperator input); }
EstimatorBase extends PipelineStageBase<E> implements Estimator<E, M> { @Override public M fit(TableEnvironment tEnv, Table input) { Preconditions.checkArgument(input != null, "Input CAN NOT BE null!"); Preconditions.checkArgument( tableEnvOf(input) == tEnv, "The input table is not in the specified table environment."); return fit(input); } EstimatorBase();  EstimatorBase(Params params); @Override M fit(TableEnvironment tEnv, Table input); M fit(Table input); abstract M fit(BatchOperator input); M fit(StreamOperator input);  }