Skip to content

Commit

Permalink
Fix checkstyle violations in test code
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Dai <daichen@amazon.com>
  • Loading branch information
dai-chen committed Aug 17, 2022
1 parent ce41f5b commit f365a9d
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 19 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -736,11 +736,11 @@ public void kmeanns_relation() {
public void ad_batchRCF_relation() {
Map<String, Literal> argumentMap =
new HashMap<String, Literal>() {{
put("shingle_size", new Literal(8, DataType.INTEGER));
}};
put("shingle_size", new Literal(8, DataType.INTEGER));
}};
assertAnalyzeEqual(
new LogicalAD(LogicalPlanDSL.relation("schema"), argumentMap),
new AD(AstDSL.relation("schema"), argumentMap)
new LogicalAD(LogicalPlanDSL.relation("schema"), argumentMap),
new AD(AstDSL.relation("schema"), argumentMap)
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ public void testAbstractPlanNodeVisitorShouldReturnNull() {
put("shingle_size", new Literal(8, DataType.INTEGER));
put("time_decay", new Literal(0.0001, DataType.DOUBLE));
put("time_field", new Literal(null, DataType.STRING));
}
});
}
});
assertNull(ad.accept(new LogicalPlanNodeVisitor<Integer, Object>() {
}, null));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,12 +263,13 @@ public void testVisitMlCommons() {
MLCommonsOperator mlCommonsOperator =
new MLCommonsOperator(
values(emptyList()), "kmeans",
new HashMap<String, Literal>() {{
put("centroids", new Literal(3, DataType.INTEGER));
put("iterations", new Literal(2, DataType.INTEGER));
put("distance_type", new Literal(null, DataType.STRING));
}
}, nodeClient);
new HashMap<String, Literal>() {{
put("centroids", new Literal(3, DataType.INTEGER));
put("iterations", new Literal(2, DataType.INTEGER));
put("distance_type", new Literal(null, DataType.STRING));
}},
nodeClient
);

assertEquals(executionProtector.doProtect(mlCommonsOperator),
executionProtector.visitMLCommons(mlCommonsOperator, null));
Expand All @@ -279,13 +280,14 @@ public void testVisitAD() {
NodeClient nodeClient = mock(NodeClient.class);
ADOperator adOperator =
new ADOperator(
values(emptyList()),
new HashMap<String, Literal>() {{
put("shingle_size", new Literal(8, DataType.INTEGER));
put("time_decay", new Literal(0.0001, DataType.DOUBLE));
put("time_field", new Literal(null, DataType.STRING));
}
}, nodeClient);
values(emptyList()),
new HashMap<String, Literal>() {{
put("shingle_size", new Literal(8, DataType.INTEGER));
put("time_decay", new Literal(0.0001, DataType.DOUBLE));
put("time_field", new Literal(null, DataType.STRING));
}},
nodeClient
);

assertEquals(executionProtector.doProtect(adOperator),
executionProtector.visitAD(adOperator, null));
Expand Down

0 comments on commit f365a9d

Please sign in to comment.