mirror of
https://github.com/alibaba/druid.git
synced 2023-03-04 19:17:16 +00:00
修复#4635:sort by 取值错误
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user