提交 60dd9ea4 authored 作者: Evgenij Ryazanov's avatar Evgenij Ryazanov

Split complicated condition for better readability

上级 da10d540
......@@ -535,10 +535,13 @@ public abstract class Query extends Prepared {
}
}
int count = expr.getSubexpressionCount();
if (expr instanceof Function ? !((Function) expr).isDeterministic() : count <= 0) {
// If expression is a non-deterministic function or expression is an
// ExpressionColumn, Parameter, SequenceValue or has other
// unsupported type without subexpressions
if (expr instanceof Function) {
if (!((Function) expr).isDeterministic()) {
return false;
}
} else if (count <= 0) {
// Expression is an ExpressionColumn, Parameter, SequenceValue or
// has other unsupported type without subexpressions
return false;
}
for (int i = 0; i < count; i++) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论