bug fixed for SchemaStat for Hierarchical Query pseudocolumn.

This commit is contained in:
wenshao
2017-04-24 18:43:40 +08:00
parent 7f75fb3eb9
commit 30a79c41ab
5 changed files with 25 additions and 14 deletions
@@ -967,6 +967,19 @@ public class SchemaStatVisitor extends SQLASTVisitorAdapter {
return false;
}
if ("LEVEL".equalsIgnoreCase(ident)) {
SQLObject parent = x.getParent();
if (parent instanceof SQLSelectItem) {
SQLObject parent2 = parent.getParent();
if (parent2 instanceof SQLSelectQueryBlock) {
SQLSelectQueryBlock queryBlock = (SQLSelectQueryBlock) parent2;
if (queryBlock.getStartWith() != null || queryBlock.getConnectBy() != null) {
return false;
}
}
}
}
Column column = null;
if (currentTable != null) {
column = addColumn(currentTable, ident);