public boolean isPartitioned() { if (getPartCols() == null) { return false; } return (getPartCols().size() != 0); }
public List<String> getPartColNames() { List<String> partColNames = new ArrayList<String>(); for (FieldSchema key : getPartCols()) { partColNames.add(key.getName()); } return partColNames; }
public static boolean isFullSpec(Table table, Map<String, String> partSpec) { for (FieldSchema partCol : table.getPartCols()) { if (partSpec.get(partCol.getName()) == null) { return false; } } return true; }
/** * Returns a list of all the columns of the table (data columns + partition * columns in that order. * * @return List<FieldSchema> */ public List<FieldSchema> getAllCols() { ArrayList<FieldSchema> f_list = new ArrayList<FieldSchema>(); f_list.addAll(getCols()); f_list.addAll(getPartCols()); return f_list; }
public FieldSchema getPartColByName(String colName) { for (FieldSchema key : getPartCols()) { if (key.getName().toLowerCase().equals(colName)) { return key; } } return null; }
private static List<String> extractPartColNames(Table tab) { List<FieldSchema> pCols = tab.getPartCols(); List<String> partCols = new ArrayList<String>(pCols.size()); for (FieldSchema pCol : pCols) { partCols.add(pCol.getName()); } return partCols; }
/** * Returns a list of all the columns of the table (data columns + partition * columns in that order. * * @return List<FieldSchema> */ public List<FieldSchema> getAllCols() { ArrayList<FieldSchema> f_list = new ArrayList<FieldSchema>(); f_list.addAll(getCols()); f_list.addAll(getPartCols()); return f_list; }
public FieldSchema getPartColByName(String colName) { for (FieldSchema key : getPartCols()) { if (key.getName().toLowerCase().equals(colName)) { return key; } } return null; }
public static boolean isFullSpec(Table table, Map<String, String> partSpec) { for (FieldSchema partCol : table.getPartCols()) { if (partSpec.get(partCol.getName()) == null) { return false; } } return true; }
public ColumnStatsAutoGatherContext(SemanticAnalyzer sa, HiveConf conf, Operator<? extends OperatorDesc> op, Table tbl, Map<String, String> partSpec, boolean isInsertInto, Context ctx) throws SemanticException { super(); this.sa = sa; this.conf = conf; this.op = op; this.tbl = tbl; this.partSpec = partSpec; this.isInsertInto = isInsertInto; this.origCtx = ctx; columns = tbl.getCols(); partitionColumns = tbl.getPartCols(); }
private static List<String> extractPartColNames(Table tab) { List<FieldSchema> pCols = tab.getPartCols(); List<String> partCols = new ArrayList<String>(pCols.size()); for (FieldSchema pCol : pCols) { partCols.add(pCol.getName()); } return partCols; }
private static List<PrimitiveTypeInfo> extractPartColTypes(Table tab) { List<FieldSchema> pCols = tab.getPartCols(); List<PrimitiveTypeInfo> partColTypeInfos = new ArrayList<PrimitiveTypeInfo>(pCols.size()); for (FieldSchema pCol : pCols) { partColTypeInfos.add(TypeInfoFactory.getPrimitiveTypeInfo(pCol.getType())); } return partColTypeInfos; }
@Override public List<String> getValues() { List<String> values = new ArrayList<String>(); for (FieldSchema fs : this.getTable().getPartCols()) { values.add(partSpec.get(fs.getName())); } return values; }
/** * @param targetTableNameInSourceQuery alias or simple name */ OnClauseAnalyzer(ASTNode onClause, Table targetTable, String targetTableNameInSourceQuery, HiveConf conf, String onClauseAsString) { this.onClause = onClause; allTargetTableColumns.addAll(targetTable.getCols()); allTargetTableColumns.addAll(targetTable.getPartCols()); this.targetTableNameInSourceQuery = unescapeIdentifier(targetTableNameInSourceQuery); this.conf = conf; this.onClauseAsString = onClauseAsString; }
@Override public List<String> getValues() { List<String> values = new ArrayList<String>(); for (FieldSchema fs : this.getTable().getPartCols()) { values.add(partSpec.get(fs.getName())); } return values; }
public String getName() { try { return Warehouse.makePartName(table.getPartCols(), tPartition.getValues()); } catch (MetaException e) { throw new RuntimeException(e); } }
private static List<PrimitiveTypeInfo> extractPartColTypes(Table tab) { List<FieldSchema> pCols = tab.getPartCols(); List<PrimitiveTypeInfo> partColTypeInfos = new ArrayList<PrimitiveTypeInfo>(pCols.size()); for (FieldSchema pCol : pCols) { partColTypeInfos.add(TypeInfoFactory.getPrimitiveTypeInfo(pCol.getType())); } return partColTypeInfos; }
public String getName() { try { return Warehouse.makePartName(table.getPartCols(), tPartition.getValues()); } catch (MetaException e) { throw new RuntimeException(e); } }
public ExtractPartPruningPredicate(RelOptCluster cluster, RelOptHiveTable hiveTable) { super(true); this.hiveTable = hiveTable; rType = hiveTable.getRowType(); List<FieldSchema> pfs = hiveTable.getHiveTableMD().getPartCols(); partCols = new HashSet<String>(); for (FieldSchema pf : pfs) { partCols.add(pf.getName()); } this.cluster = cluster; }
public void checkValidity() throws HiveException { if (!tPartition.getSd().equals(table.getSd())) { Table.validateColumns(getCols(), table.getPartCols()); } } }