private void mergeScalars(LogicalPlan lp, Graph g) throws FrontendException {
// When we start processing a store we look for scalars to add stores
// to respective logical plans and temporary files to the attributes
// Here we need to find if there are duplicates so that we do not add
// two stores for one plan
ScalarFinder scalarFinder = new ScalarFinder(lp);
scalarFinder.visit();
Map<LOUserFunc, Pair<LogicalPlan, LogicalOperator>> scalarMap = scalarFinder.getScalarMap();
try {
for(Map.Entry<LOUserFunc, Pair<LogicalPlan, LogicalOperator>> scalarEntry: scalarMap.entrySet()) {
FileSpec fileSpec;
String alias = scalarEntry.getKey().getImplicitReferencedOperator().getAlias();