修复#4635:sort by 取值错误

This commit is contained in:
weipeng
2022-08-30 09:42:14 +08:00
committed by 温绍锦
parent 51c27ae847
commit 3ad82b0cf2
@@ -5104,11 +5104,14 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
}
}
SQLOrderBy sortBy = x.getDistributeBy();
SQLOrderBy sortBy = x.getSortBy();
if (sortBy != null) {
List<SQLSelectOrderByItem> items = sortBy.getItems();
if (items.size() > 0) {
if (distributeBy != null) {
print0(" ");
}
print0(ucase ? "SORT BY " : "sort by ");
for (int i = 0, size = items.size(); i < size; ++i) {