[fix](nereids)should normalize mv column's name before matching prefix keys (#27464)

This commit is contained in:
starocean999
2024-01-29 10:50:17 +08:00
committed by yiguolei
parent ae38f28280
commit 5a13c7596a
2 changed files with 50 additions and 2 deletions

View File

@ -358,9 +358,9 @@ public abstract class AbstractSelectMaterializedIndexRule {
Set<String> nonEqualColNames) {
int matchCount = 0;
for (Column column : table.getSchemaByIndexId(index.getId())) {
if (equalColNames.contains(column.getName())) {
if (equalColNames.contains(normalizeName(column.getNameWithoutMvPrefix()))) {
matchCount++;
} else if (nonEqualColNames.contains(column.getName())) {
} else if (nonEqualColNames.contains(normalizeName(column.getNameWithoutMvPrefix()))) {
// un-equivalence predicate's columns can match only first column in index.
matchCount++;
break;