diff --git a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinder.java b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinder.java index d631ef671395d..b9fd36c93e3d5 100644 --- a/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinder.java +++ b/infra/binder/src/main/java/org/apache/shardingsphere/infra/binder/engine/segment/from/type/JoinTableSegmentBinder.java @@ -171,11 +171,11 @@ private static Map getUsingColumnsByNaturalJoin(final } private static Map getUsingColumns(final Collection projectionSegments, final Collection usingColumns, final String joinType) { - Multimap columnLabelProjectionSegments = LinkedHashMultimap.create(); - projectionSegments.forEach(each -> columnLabelProjectionSegments.put(each.getColumnLabel(), each)); + Multimap columnLabelProjectionSegments = LinkedHashMultimap.create(); + projectionSegments.forEach(each -> columnLabelProjectionSegments.put(new CaseInsensitiveString(each.getColumnLabel()), each)); Map result = new CaseInsensitiveMap<>(); for (ColumnSegment each : usingColumns) { - LinkedList groupProjectionSegments = new LinkedList<>(columnLabelProjectionSegments.get(each.getIdentifier().getValue())); + LinkedList groupProjectionSegments = new LinkedList<>(columnLabelProjectionSegments.get(new CaseInsensitiveString(each.getIdentifier().getValue()))); if (!groupProjectionSegments.isEmpty()) { ProjectionSegment targetProjectionSegment = JoinType.RIGHT.name().equalsIgnoreCase(joinType) ? groupProjectionSegments.descendingIterator().next() : groupProjectionSegments.iterator().next();