mirror of https://github.com/alibaba/druid.git
Fix holo order by quota. (#6456)
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (11, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (17, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (21, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (8, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (11, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (17, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (21, ubuntu-latest) (push) Has been cancelled
Details
Java CI / Test JDK ${{ matrix.java }}, ${{ matrix.os }} (8, ubuntu-latest) (push) Has been cancelled
Details
* Fix holo order by quota. * Add test case.
This commit is contained in:
parent
7cd44fcc56
commit
d97cb18a20
|
@ -3041,6 +3041,16 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
|||
|
||||
if (expr instanceof SQLIntegerExpr) {
|
||||
print(((SQLIntegerExpr) expr).getNumber().longValue());
|
||||
} else if (expr instanceof SQLCharExpr) {
|
||||
if (dialect != null) {
|
||||
String name = "'" + ((SQLCharExpr) expr).getText() + "'";
|
||||
printName0(replaceQuota(name));
|
||||
} else {
|
||||
printExpr(expr, parameterized);
|
||||
}
|
||||
} else if (expr instanceof SQLIdentifierExpr) {
|
||||
((SQLIdentifierExpr) expr).setName(replaceQuota(((SQLIdentifierExpr) expr).getName()));
|
||||
printExpr(expr, parameterized);
|
||||
} else {
|
||||
printExpr(expr, parameterized);
|
||||
}
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
quote="
|
|
@ -1,3 +1,12 @@
|
|||
SELECT sum(ret_amount) AS '应收金额'
|
||||
FROM test.test
|
||||
GROUP BY a ORDER BY '应收金额' DESC;
|
||||
--------------------
|
||||
SELECT sum(ret_amount) AS `应收金额`
|
||||
FROM test.test
|
||||
GROUP BY a
|
||||
ORDER BY `应收金额` DESC;
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
select substr(${yesterday},1,4)
|
||||
--------------------
|
||||
SELECT substr(${yesterday}, 1, 4)
|
||||
|
|
|
@ -1,3 +1,12 @@
|
|||
SELECT sum(ret_amount) AS '应收金额'
|
||||
FROM test.test
|
||||
GROUP BY a ORDER BY '应收金额' DESC;
|
||||
--------------------
|
||||
SELECT sum(ret_amount) AS "应收金额"
|
||||
FROM test.test
|
||||
GROUP BY a
|
||||
ORDER BY "应收金额" DESC;
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS my_partitioned_table (
|
||||
id INT,
|
||||
name text,
|
||||
|
|
Loading…
Reference in New Issue