@@ -0,0 +1,840 @@
+package net.opentsdb.query.expression;%0A%0Aimport java.util.HashMap;%0Aimport java.util.Map;%0A%0Aimport com.google.common.annotations.VisibleForTesting;%0A%0Apublic class ExpressionFactory %7B%0A  %0A  private static Map%3CString, Expression%3E availableFunctions = %0A      new HashMap%3CString, Expression%3E();%0A  %0A  static %7B%0A    availableFunctions.put(%22scale%22, new Scale());%0A    availableFunctions.put(%22absolute%22, new Absolute());%0A    availableFunctions.put(%22movingAverage%22, new MovingAverage());%0A    availableFunctions.put(%22highestCurrent%22, new HighestCurrent());%0A    availableFunctions.put(%22highestMax%22, new HighestMax());%0A  %7D%0A  %0A  @VisibleForTesting%0A  static void addFunction(String name, Expression expr) %7B%0A    availableFunctions.put(name, expr);%0A  %7D%0A  %0A  public static Expression getByName(String funcName) %7B%0A    return availableFunctions.get(funcName);%0A  %7D%0A%7D%0A

Add the ExpressionFactory class that stores a map of the available functions.