diff --git a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ProjectionsToken.java b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ProjectionsToken.java index 0088eb5c92480..e3b505a65b830 100644 --- a/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ProjectionsToken.java +++ b/features/sharding/core/src/main/java/org/apache/shardingsphere/sharding/rewrite/token/pojo/ProjectionsToken.java @@ -37,6 +37,11 @@ public ProjectionsToken(final int startIndex, final Map> projections = new HashMap<>(1, 1); + RouteUnit routeUnit = new RouteUnit(new RouteMapper("foo_ds", "foo_ds_0"), Collections.singleton(new RouteMapper("foo_tbl", "foo_tbl_1"))); + assertThat(new ProjectionsToken(0, Collections.singletonMap(routeUnit, Collections.singleton("foo_col"))).toString(routeUnit), is(", foo_col")); + } +}