continue;
}
String outputCol = oldValueInfo.getInternalName();
if (outputRS.get(key, field) == null) {
outputColumnNames.add(outputCol);
ExprNodeDesc colDesc = new ExprNodeColumnDesc(valueInfo.getType(), valueInfo
.getInternalName(), valueInfo.getTabAlias(), valueInfo.getIsVirtualCol());
values.add(colDesc);
outputRS.put(key, field, new ColumnInfo(outputCol, valueInfo.getType(), valueInfo
.getTabAlias(), valueInfo.getIsVirtualCol(), valueInfo.isHiddenVirtualCol()));
colExprMap.put(outputCol, colDesc);
}
}
}
valueExprMap.put(Byte.valueOf((byte) pos), values);
}
Map<Byte, List<ExprNodeDesc>> filterMap = desc.getFilters();
for (Map.Entry<Byte, List<ExprNodeDesc>> entry : filterMap.entrySet()) {
Byte srcAlias = entry.getKey();
List<ExprNodeDesc> columnDescList = entry.getValue();
for (ExprNodeDesc nodeExpr : columnDescList) {
ExprNodeGenericFuncDesc funcDesc = (ExprNodeGenericFuncDesc) nodeExpr;
for (ExprNodeDesc childDesc : funcDesc.getChildExprs()) {
if (!(childDesc instanceof ExprNodeColumnDesc)) {
continue;
}
ExprNodeColumnDesc columnDesc = (ExprNodeColumnDesc) childDesc;
// reset columns
String column = columnDesc.getColumn();
String newColumn = null;
HashMap<String, ExprNodeDesc> map = columnTransfer.get(srcAlias);
ExprNodeColumnDesc tmpDesc = (ExprNodeColumnDesc) map.get(column);
if (tmpDesc != null) {
newColumn = tmpDesc.getColumn();
}
if (newColumn == null) {
throw new SemanticException("No Column name found in parent reduce sink op");
}
columnDesc.setColumn(newColumn);
}
}
}
JoinCondDesc[] joinCondns = op.getConf().getConds();
Operator[] newPar = new Operator[newParentOps.size()];
pos = 0;
for (Operator<? extends Serializable> o : newParentOps) {
newPar[pos++] = o;
}
List<ExprNodeDesc> keyCols = keyExprMap.get(Byte.valueOf((byte) 0));
StringBuilder keyOrder = new StringBuilder();
for (int i = 0; i < keyCols.size(); i++) {
keyOrder.append("+");
}
TableDesc keyTableDesc = PlanUtils.getMapJoinKeyTableDesc(PlanUtils
.getFieldSchemasFromColumnList(keyCols, "mapjoinkey"));
List<TableDesc> valueTableDescs = new ArrayList<TableDesc>();
List<TableDesc> valueFiltedTableDescs = new ArrayList<TableDesc>();
for (pos = 0; pos < newParentOps.size(); pos++) {
List<ExprNodeDesc> valueCols = valueExprMap.get(Byte.valueOf((byte) pos));
int length = valueCols.size();
List<ExprNodeDesc> valueFilteredCols = new ArrayList<ExprNodeDesc>(length);
// deep copy expr node desc
for (int i = 0; i < length; i++) {
valueFilteredCols.add(valueCols.get(i).clone());
}
List<ExprNodeDesc> valueFilters = filterMap.get(Byte.valueOf((byte) pos));
if (valueFilters != null && valueFilters.size() != 0 && pos != mapJoinPos) {
ExprNodeColumnDesc isFilterDesc = new ExprNodeColumnDesc(TypeInfoFactory
.getPrimitiveTypeInfo(Constants.BOOLEAN_TYPE_NAME), "filter", "filter", false);
valueFilteredCols.add(isFilterDesc);
}