class ApproxVectorSimilarityTopNLSHBatchOp extends BatchOperator<ApproxVectorSimilarityTopNLSHBatchOp> implements ApproxVectorTopNLSHParams<ApproxVectorSimilarityTopNLSHBatchOp> {

	@Override
	public ApproxVectorSimilarityTopNLSHBatchOp linkFrom(BatchOperator<?>... inputs) {
		checkOpSize(2, inputs);
        checkOpSize(2, inputs);

        String leftIdCol = this.getLeftIdCol();
        String rightIdCol = this.getRightIdCol();

        DataSet<BaseLSH> lsh = LocalitySensitiveHashApproxFunctions.buildLSH(inputs[0], inputs[1], this.getParams());

        DataSet<Row> res = LocalitySensitiveHashApproxFunctions.approxNearestNeighbors(
            inputs[1].select(new String[] {rightIdCol, getRightCol()}).getDataSet(),
            inputs[0].select(new String[] {leftIdCol, getLeftCol()}).getDataSet(), this.getTopN(), lsh);

        this.setOutput(res, getTopNOutputSchema(inputs, leftIdCol, rightIdCol));
        return this;
	}

	public  ApproxVectorSimilarityTopNLSHBatchOp();
	public  ApproxVectorSimilarityTopNLSHBatchOp(Params params);

}