use of com.alibaba.druid.sql.ast.statement.SQLExprTableSource in project druid by alibaba.
the class HiveSchemaStatVisitor method visit.
@Override
public boolean visit(HiveInsert x) {
setMode(x, TableStat.Mode.Insert);
SQLExprTableSource tableSource = x.getTableSource();
SQLExpr tableName = tableSource != null ? tableSource.getExpr() : null;
if (tableName instanceof SQLName) {
TableStat stat = getTableStat((SQLName) tableName);
stat.incrementInsertCount();
}
for (SQLAssignItem partition : x.getPartitions()) {
partition.accept(this);
}
accept(x.getQuery());
return false;
}
use of com.alibaba.druid.sql.ast.statement.SQLExprTableSource in project druid by alibaba.
the class OdpsSchemaStatVisitor method visit.
@Override
public boolean visit(OdpsUnloadStatement x) {
SQLExprTableSource table = (SQLExprTableSource) x.getFrom();
TableStat stat = getTableStatWithUnwrap(table.getExpr());
if (stat != null) {
stat.incrementSelectCount();
}
resolvePartitions(table, x.getPartitions());
return false;
}
use of com.alibaba.druid.sql.ast.statement.SQLExprTableSource in project druid by alibaba.
the class OdpsSchemaStatVisitor method visit.
@Override
public boolean visit(OdpsExstoreStatement x) {
SQLExprTableSource table = x.getTable();
TableStat stat = getTableStatWithUnwrap(table.getExpr());
if (stat != null) {
stat.incrementSelectCount();
}
resolvePartitions(table, x.getPartitions());
return false;
}
use of com.alibaba.druid.sql.ast.statement.SQLExprTableSource in project druid by alibaba.
the class OracleLockTableStatement method setTable.
public void setTable(SQLName table) {
this.setTable(new SQLExprTableSource(table));
this.table.setParent(this);
}
use of com.alibaba.druid.sql.ast.statement.SQLExprTableSource in project druid by alibaba.
the class OracleSelectQueryBlock method setFrom.
public void setFrom(String tableName) {
SQLExprTableSource from;
if (tableName == null || tableName.length() == 0) {
from = null;
} else {
from = new OracleSelectTableReference(new SQLIdentifierExpr(tableName));
}
this.setFrom(from);
}
Aggregations