Sets the aggregation col in interpreter.

@param m
the m
@param interpreter
the interpreter
@param exp
the exp
177810
private void setAggregationColInInterpreter(EntityMetadata m, CouchDBQueryInterpreter interpreter, Expression exp)
    {
        if (StateFieldPathExpression.class.isAssignableFrom(exp.getClass()))
        {
            Map<String, Object> map = KunderaQueryUtils.setFieldClazzAndColumnFamily(exp, m, kunderaMetadata);
            interpreter.setAggregationColumn((String) map.get(Constants.COL_NAME));
        }
    }
837519
protected void setAttributes(FaceletContext ctx, Object instance) {
        if (instance != null) {
            Class type = instance.getClass();
            if (mapper == null || !this.lastType.equals(type)) {
                this.lastType = type;
                this.mapper = this.createMetaRuleset(type).finish();
            }
            this.mapper.applyMetadata(ctx, instance);
        }
    }
641271
private void setMeasureExp(TypeCheckInfo question, SFunctionDefinitionBase node, Environment base, Environment local, NameScope scope) throws AnalysisException
	{
		PType actual = node.getMeasure().apply(THIS, question.newInfo(local));
		node.setMeasureName(node.getName().getMeasureName(node.getName().getLocation()));
		checkMeasure(question, node, node.getMeasureName(), actual);
		
		List<List<PPattern>> cpll = new Vector<List<PPattern>>();
		boolean isCurried;
		
		if (node instanceof AExplicitFunctionDefinition)
		{
			// Concatenate the parameter patterns into one list for curried measures
			List<PPattern> all = new Vector<PPattern>();
			AExplicitFunctionDefinition ex = (AExplicitFunctionDefinition) node;
			
			for (List<PPattern> pl: ex.getParamPatternList())
			{
				for (PPattern p: pl)
				{
					all.add(p.clone());
				}
			}
			
			cpll.add(all);
			isCurried = ex.getIsCurried();
		}
		else
		{
			List<PPattern> all = new Vector<PPattern>();
			AImplicitFunctionDefinition imp = (AImplicitFunctionDefinition) node;
			
			for (APatternListTypePair ptp: imp.getParamPatterns())
			{
				for (PPattern p: ptp.getPatterns())
				{
					all.add(p.clone());
				}
			}

			cpll.add(all);
			isCurried = false;
		}
		
		AFunctionType mtype = question.assistantFactory.createAFunctionTypeAssistant().getMeasureType((AFunctionType) node.getType(), isCurried, actual);
		
		AExplicitFunctionDefinition def = AstFactory.newAExplicitFunctionDefinition(node.getMeasureName(), scope,
				(List<ILexNameToken>) node.getTypeParams().clone(), mtype, cpll, node.getMeasure(), null, null, false, null);

		def.setClassDefinition(node.getClassDefinition() == null ? null : node.getClassDefinition().clone());
		def.setAccess(node.getAccess().clone());
		question.assistantFactory.createPDefinitionAssistant().typeResolve(def, THIS, question);
		def.apply(THIS, question);
		
		node.setMeasureDef(def);
	}
862618
def set_mean(self, col, row, mean):
        
        javabridge.call(self.jobject, "setMean", "(IID)V", col, row, mean)
794531
@Override
  public void setDecomposition(int value) {
    if (value < Collator.NO_DECOMPOSITION || value > Collator.FULL_DECOMPOSITION) {
      throw new IllegalArgumentException();
    }
    decomposition = value;
  }
174758
private void assign(final Object val,
                      final Collection<Object> col,
                      final Object o,
                      final Method meth) throws Throwable {
    if (col != null) {
      col.add(val);
    } else {
      Object[] pars = new Object[]{val};

      meth.invoke(o, pars);
    }
  }
259553
protected void convertToColumnMajor(DMatrixRMaj A) {
        for( int x = 0; x < numCols; x++ ) {
            double colQ[] = dataQR[x];
            for( int y = 0; y < numRows; y++ ) {
                colQ[y] = A.data[y*A.numCols+x];
            }
        }
    }
1238277
@Override
	public void setup(AbstractInvokable parent) {
		agg = ((IterationRuntimeContext) getUdfRuntimeContext()).getIterationAggregator(BulkIterationBase.TERMINATION_CRITERION_AGGREGATOR_NAME);
	}
1158125
private Object getAggregatedResult(InternalAggregations internalAggs, String identifier, Expression exp)
    {
        switch (identifier)
        {
        case Expression.MIN:
            return (((InternalMin) internalAggs.get(exp.toParsedText())).getValue());

        case Expression.MAX:
            return (((InternalMax) internalAggs.get(exp.toParsedText())).getValue());

        case Expression.AVG:
            return (((InternalAvg) internalAggs.get(exp.toParsedText())).getValue());

        case Expression.SUM:
            return (((InternalSum) internalAggs.get(exp.toParsedText())).getValue());

        case Expression.COUNT:
            return (((InternalValueCount) internalAggs.get(exp.toParsedText())).getValue());
        }

        throw new KunderaException("No support for " + identifier + " aggregation.");
    }
702806
public void setM(double m)
    {
        if(m < 0 || Double.isInfinite(m) || Double.isNaN(m))
            throw new ArithmeticException("The minimum count must be a non negative number");
        this.m = m;
    }
475384
@Override
	public long count(final String col) {
		final String expr = col != null
				? tableMetadata.getColumn(CaseFormat.CAMEL_CASE.convert(col)).getColumnIdentifier()
				: "*";
		StringBuilder sql = new StringBuilder("select count(").append(expr).append(") from (")
				.append(System.lineSeparator())
				.append(aggregationSourceSql())
				.append(System.lineSeparator())
				.append(") t_");
		context().setSql(sql.toString());
		try (ResultSet rs = agent().query(context())) {
			rs.next();
			return rs.getLong(1);
		} catch (final SQLException e) {
			throw new EntitySqlRuntimeException(SqlKind.SELECT, e);
		}
	}
1085018
private boolean isIdCol(EntityMetadata m, String colName)
    {
        return ((AbstractAttribute) m.getIdAttribute()).getJPAColumnName().equals(colName);
    }
733765
private static void addToOutputColumns(Expression selectExpression, EntityMetadata m,
            List<Map<String, Object>> columnsToOutput, KunderaMetadata kunderaMetadata)
    {

        Map<String, Object> map = setFieldClazzAndColumnFamily(selectExpression, m, kunderaMetadata);
        columnsToOutput.add(map);
    }
1152874
void setMemo(String production, int position, int line, final MemoEntry stackElement) {
	Map<String, MemoEntry> map = memo.get(position);
	if (map == null) {
	    map = new HashMap<String, MemoEntry>();
	    memo.put(position, map);
	    map.put(production, stackElement);
	} else {
	    if (map.containsKey(production)) {
		throw new RuntimeException("We should not set a memo twice. Modifying is needed afterwards.");
	    }
	    map.put(production, stackElement);
	}
    }
261956
public void eInit(EObject context, Procedure1<? super XExpression> setter, IJvmTypeProvider typeContext) {
		setTypeResolutionContext(typeContext);
		this.context = context;
		this.setter = setter;
		this.expr = null;
	}
242318
@Override
	public void setAggregator(IAggregator aggregator) {
		this.aggregator = aggregator;
		// get the file resource factory
		Iterable<IAggregatorExtension> iter = aggregator.getExtensions(IResourceFactoryExtensionPoint.ID);
		for (IAggregatorExtension ext : iter) {
			if ("file".equals(ext.getAttribute("scheme"))) { //$NON-NLS-1$ //$NON-NLS-2$
				fileResourceFactory = (IResourceFactory)ext.getInstance();
				break;
			}
		}
		if (fileResourceFactory == null) {
			throw new IllegalStateException("Missing file resource factory"); //$NON-NLS-1$
		}
	}
273005
private void insertAggExpressionsToAggResultColumns (
            List<AbstractExpression> aggColumns, ParsedColInfo cookedCol) {
        for (AbstractExpression expr: aggColumns) {
            assert(expr instanceof AggregateExpression);
            if (expr.hasSubquerySubexpression()) {
                throw new PlanningErrorException(
                        "SQL Aggregate function calls with subquery expression arguments are not allowed.");
            }

            ParsedColInfo col = new ParsedColInfo();
            col.m_expression = expr.clone();
            assert(col.m_expression instanceof AggregateExpression);
            if (col.m_expression.getExpressionType() == ExpressionType.AGGREGATE_AVG) {
                m_hasAverage = true;
            }
            if (aggColumns.size() == 1 &&
                    cookedCol.m_expression.equals(aggColumns.get(0))) {
                col.m_alias = cookedCol.m_alias;
                col.m_tableName = cookedCol.m_tableName;
                col.m_tableAlias = cookedCol.m_tableAlias;
                col.m_columnName = cookedCol.m_columnName;
                if (!m_aggResultColumns.contains(col)) {
                    m_aggResultColumns.add(col);
                }
                return;
            }
            // Try to check complexAggs earlier
            m_hasComplexAgg = true;
            // Aggregation column use the the hacky stuff
            col.m_tableName = TEMP_TABLE_NAME;
            col.m_tableAlias = TEMP_TABLE_NAME;
            col.m_columnName = "";
            if (!m_aggResultColumns.contains(col)) {
                m_aggResultColumns.add(col);
            }
            ExpressionUtil.finalizeValueTypes(col.m_expression);
        }
    }