[fix](nereids)show error message if use wrong alias to bind the table (#31264)

This commit is contained in:
starocean999
2024-02-22 19:55:43 +08:00
committed by yiguolei
parent 9481728b37
commit 100cea16d9
2 changed files with 10 additions and 0 deletions

View File

@ -260,6 +260,9 @@ public class SlotBinder extends SubExprAnalyzer {
}
}).collect(Collectors.toList());
if (slots.isEmpty()) {
throw new AnalysisException("unknown qualifier: " + StringUtils.join(qualifierStar, ".") + ".*");
}
return new BoundStar(slots);
}

View File

@ -49,6 +49,13 @@ suite("test_bind_view") {
);
"""
test {
sql """
select ggg.* from ( select * from ${table_name} ) l;
"""
exception "unknown qualifier:"
}
try {
sql """