private static List getTableColumns(ISession session, Table table) throws IOException { List colNames = new ArrayList(); String tableName = table.getSchemaName() + "." + table.getName(); SeColumnDefinition[] cols = session.describe(tableName); for (int i = 0; i < cols.length; i++) { String colName = cols[i].getName(); colName = tableName + "." + colName; colNames.add(colName); } return colNames; }
public static String getSchemaName(Connector c, Table table) throws SQLException { return table.getSchemaName() != null ? table.getSchemaName() : getSchemaName(c); }