[fix](nereids)show error message if use wrong alias to bind the table (#31264)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
||||
@ -49,6 +49,13 @@ suite("test_bind_view") {
|
||||
);
|
||||
"""
|
||||
|
||||
test {
|
||||
sql """
|
||||
select ggg.* from ( select * from ${table_name} ) l;
|
||||
"""
|
||||
exception "unknown qualifier:"
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
sql """
|
||||
|
||||
Reference in New Issue
Block a user