// LineageCtx
LineageCtx lCtx = (LineageCtx) procCtx;
ParseContext pctx = lCtx.getParseCtx();
// Table scan operator.
TableScanOperator top = (TableScanOperator)nd;
org.apache.hadoop.hive.ql.metadata.Table t = pctx.getTopToTable().get(top);
Table tab = t.getTTable();
// Generate the mappings
RowSchema rs = top.getSchema();
List<FieldSchema> cols = t.getAllCols();
Map<String, FieldSchema> fieldSchemaMap = new HashMap<String, FieldSchema>();
for(FieldSchema col : cols) {
fieldSchemaMap.put(col.getName(), col);
}
Iterator<VirtualColumn> vcs = VirtualColumn.getRegistry(pctx.getConf()).iterator();
while (vcs.hasNext()) {
VirtualColumn vc = vcs.next();
fieldSchemaMap.put(vc.getName(), new FieldSchema(vc.getName(),
vc.getTypeInfo().getTypeName(), ""));
}
TableAliasInfo tai = new TableAliasInfo();
tai.setAlias(top.getConf().getAlias());
tai.setTable(tab);
for(ColumnInfo ci : rs.getSignature()) {
// Create a dependency
Dependency dep = new Dependency();
BaseColumnInfo bci = new BaseColumnInfo();