mirror of https://github.com/alibaba/druid.git
Compare commits
4 Commits
b1238eae4a
...
dba99c0636
Author | SHA1 | Date |
---|---|---|
|
dba99c0636 | |
|
c0a58c10b7 | |
|
da4832aa85 | |
|
7538dc54a7 |
|
@ -3149,6 +3149,9 @@ public class DruidDataSource extends DruidAbstractDataSource
|
|||
|
||||
// shrink connections by HotSpot intrinsic function _arraycopy for performance optimization.
|
||||
int removeCount = evictCount + keepAliveCount;
|
||||
if (removeCount > poolingCount) {
|
||||
removeCount = poolingCount;
|
||||
}
|
||||
if (removeCount > 0) {
|
||||
int breakedCount = poolingCount - i;
|
||||
if (breakedCount > 0) {
|
||||
|
@ -3253,7 +3256,9 @@ public class DruidDataSource extends DruidAbstractDataSource
|
|||
lock.lock();
|
||||
try {
|
||||
int fillCount = minIdle - (activeCount + poolingCount + createTaskCount);
|
||||
emptySignal(fillCount);
|
||||
if (fillCount > 0) {
|
||||
emptySignal(fillCount);
|
||||
}
|
||||
} finally {
|
||||
lock.unlock();
|
||||
}
|
||||
|
|
|
@ -104,4 +104,8 @@ public class HologresOutputVisitor extends PGOutputVisitor {
|
|||
endLineComment = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void printArrayExprPrefix() {
|
||||
print0(ucase ? "ARRAY" : "array");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -202,4 +202,8 @@ public class PrestoOutputVisitor extends SQLASTOutputVisitor implements PrestoAS
|
|||
timeZone.accept(this);
|
||||
return false;
|
||||
}
|
||||
|
||||
public void printArrayExprPrefix() {
|
||||
print0(ucase ? "ARRAY" : "array");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7650,6 +7650,8 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
|||
return false;
|
||||
}
|
||||
|
||||
public void printArrayExprPrefix() {
|
||||
}
|
||||
@Override
|
||||
public boolean visit(SQLArrayExpr x) {
|
||||
SQLExpr expr = x.getExpr();
|
||||
|
@ -7661,10 +7663,7 @@ public class SQLASTOutputVisitor extends SQLASTVisitorAdapter implements Paramet
|
|||
} else if (expr != null) {
|
||||
expr.accept(this);
|
||||
} else {
|
||||
boolean trino = dbType == DbType.trino || dbType == DbType.presto || dbType == DbType.supersql;
|
||||
if (trino) {
|
||||
print0(ucase ? "ARRAY" : "array");
|
||||
}
|
||||
printArrayExprPrefix();
|
||||
}
|
||||
|
||||
if (x.getDataType() != null) {
|
||||
|
|
|
@ -1,3 +1,7 @@
|
|||
select []
|
||||
--------------------
|
||||
SELECT ARRAY[]
|
||||
------------------------------------------------------------------------------------------------------------------------
|
||||
select cast(($0 + interval $1 week) as date)
|
||||
--------------------
|
||||
SELECT CAST(($0 + INTERVAL '$1' WEEK) AS date)
|
||||
|
|
Loading…
Reference in New Issue