@Test
public void testBRPSimilarity(){

	int len = 200, size = 10;
	Row[] left = new Row[len];
	Row[] right = new Row[len];
	for(int i = 0; i < left.length; i++){
		left[i] = Row.of(i, DenseVector.rand(size));
		right[i] = Row.of(i, DenseVector.rand(size));
	}
	MemSourceBatchOp leftData = new MemSourceBatchOp(Arrays.asList(left), new String[] {"leftId", "leftVec"});
	MemSourceBatchOp rightData = new MemSourceBatchOp(Arrays.asList(right), new String[] {"rightId", "rightVec"});
	BatchOperator op = new ApproxVectorSimilarityJoinLSHBatchOp()
		.setLeftCol("leftVec")
		.setRightCol("rightVec")
		.setLeftIdCol("leftId")
		.setRightIdCol("rightId")
		.setDistanceType("EUCLIDEAN")
		.setOutputCol("distance")
		.setDistanceThreshold(1.0);
	List<Row> res = op.linkFrom(leftData, rightData).collect();
	for(Row row : res){
		Assert.assertTrue((double)row.getField(2) < 1.0);
	}
}