提交 85058c5d authored 作者: Owner's avatar Owner

Removed debug code and old recursive detection code

上级 54e6e45c
......@@ -569,8 +569,7 @@ public class Select extends Query {
}
boolean lazy = session.isLazyQueryExecution() &&
target == null && !isForUpdate && !isQuickAggregateQuery &&
limitRows != 0 && offsetExpr == null && isReadOnly() &&
!hasRecursiveTopTableView();
limitRows != 0 && offsetExpr == null && isReadOnly();
int columnCount = expressions.size();
LocalResult result = null;
if (!lazy && (target == null ||
......@@ -664,17 +663,6 @@ public class Select extends Query {
return null;
}
private boolean hasRecursiveTopTableView() {
//check the top table filter only to see if we have a recursive table query
// if(this.topTableFilter.getTable().isTableExpression()){
// TableView v = (TableView)this.topTableFilter.getTable();
// if(v.isRecursive()){
// return true;
// }
// }
return false;
}
private void resetJoinBatchAfterQuery() {
JoinBatch jb = getJoinBatch();
if (jb != null) {
......
......@@ -185,7 +185,6 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
ResultInterface recursiveResult = view.getRecursiveResult();
if (recursiveResult != null) {
recursiveResult.reset();
//System.out.println("findRecursive.return ViewCursor=recResult="+recursiveResult+",first="+first+",last="+last);
return new ViewCursor(this, recursiveResult, first, last);
}
if (query == null) {
......@@ -193,7 +192,6 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
parser.setRightsChecked(true);
parser.setSuppliedParameterList(originalParameters);
query = (Query) parser.prepare(querySQL);
//System.out.println("findRecursive.querySQL="+querySQL);
query.setNeverLazy(true);
}
if (!query.isUnion()) {
......@@ -212,12 +210,10 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
localResult.setMaxMemoryRows(Integer.MAX_VALUE);
while (resultInterface.next()) {
Value[] cr = resultInterface.currentRow();
//System.out.println("findRecursive.while left resultinterface next row="+Arrays.toString(cr));
localResult.addRow(cr);
}
Query right = union.getRight();
right.setNeverLazy(true);
//System.out.println("right="+right.getSQL());
resultInterface.reset();
view.setRecursiveResult(resultInterface);
// to ensure the last result is not closed
......@@ -225,12 +221,10 @@ public class ViewIndex extends BaseIndex implements SpatialIndex {
while (true) {
resultInterface = right.query(0);
if (!resultInterface.hasNext()) {
//System.out.println("right query has no results");
break;
}
while (resultInterface.next()) {
Value[] cr = resultInterface.currentRow();
//System.out.println("findRecursive.while right resultinterface next row="+Arrays.toString(cr));
localResult.addRow(cr);
}
resultInterface.reset();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论