public void trace(ParserRuleContext ctx, Var var, Metadata meta, int idx) {
    if (var.type != Var.Type.ROW) {
      trace(ctx, "COLUMN: " + meta.columnName(idx) + ", " + meta.columnTypeName(idx));
      trace(ctx, "SET " + var.getName() + " = " + var.toString());  
    }
    else {
      Row row = (Row)var.value;
      int cnt = row.size();
      for (int j = 1; j <= cnt; j++) {
        Var v = row.getValue(j - 1);
        trace(ctx, "COLUMN: " + meta.columnName(j) + ", " + meta.columnTypeName(j));
        trace(ctx, "SET " + v.getName() + " = " + v.toString());
      }
    }
  }
Trace values retrived from the database
hplsql/src/main/java/org/apache/hive/hplsql/Exec.java