asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjaco...@apache.org
Subject [13/23] asterixdb git commit: ASTERIXDB-1711: remove more mentions of Asterix
Date Fri, 16 Dec 2016 18:11:59 GMT
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f76d9c37/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
index 4b77f35..185232e 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/functions/MetadataBuiltinFunctions.java
@@ -20,7 +20,7 @@ package org.apache.asterix.metadata.functions;
 
 import org.apache.asterix.metadata.declared.MetadataProvider;
 import org.apache.asterix.metadata.entities.Dataset;
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
 import org.apache.asterix.om.types.ATypeTag;
 import org.apache.asterix.om.types.BuiltinType;
@@ -37,17 +37,17 @@ public class MetadataBuiltinFunctions {
 
     static {
         addMetadataBuiltinFunctions();
-        AsterixBuiltinFunctions.addUnnestFun(AsterixBuiltinFunctions.DATASET, false);
-        AsterixBuiltinFunctions.addDatasetFunction(AsterixBuiltinFunctions.DATASET);
-        AsterixBuiltinFunctions.addUnnestFun(AsterixBuiltinFunctions.FEED_COLLECT, false);
-        AsterixBuiltinFunctions.addDatasetFunction(AsterixBuiltinFunctions.FEED_COLLECT);
-        AsterixBuiltinFunctions.addUnnestFun(AsterixBuiltinFunctions.FEED_INTERCEPT, false);
-        AsterixBuiltinFunctions.addDatasetFunction(AsterixBuiltinFunctions.FEED_INTERCEPT);
+        BuiltinFunctions.addUnnestFun(BuiltinFunctions.DATASET, false);
+        BuiltinFunctions.addDatasetFunction(BuiltinFunctions.DATASET);
+        BuiltinFunctions.addUnnestFun(BuiltinFunctions.FEED_COLLECT, false);
+        BuiltinFunctions.addDatasetFunction(BuiltinFunctions.FEED_COLLECT);
+        BuiltinFunctions.addUnnestFun(BuiltinFunctions.FEED_INTERCEPT, false);
+        BuiltinFunctions.addDatasetFunction(BuiltinFunctions.FEED_INTERCEPT);
     }
 
     public static void addMetadataBuiltinFunctions() {
 
-        AsterixBuiltinFunctions.addFunction(AsterixBuiltinFunctions.DATASET, new IResultTypeComputer()
{
+        BuiltinFunctions.addFunction(BuiltinFunctions.DATASET, new IResultTypeComputer()
{
 
             @Override
             public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment
env,
@@ -89,15 +89,15 @@ public class MetadataBuiltinFunctions {
             }
         }, true);
 
-        AsterixBuiltinFunctions.addPrivateFunction(AsterixBuiltinFunctions.FEED_COLLECT,
new IResultTypeComputer() {
+        BuiltinFunctions.addPrivateFunction(BuiltinFunctions.FEED_COLLECT, new IResultTypeComputer()
{
 
             @Override
             public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment
env,
                     IMetadataProvider<?, ?> mp) throws AlgebricksException {
                 AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
-                if (f.getArguments().size() != AsterixBuiltinFunctions.FEED_COLLECT.getArity())
{
+                if (f.getArguments().size() != BuiltinFunctions.FEED_COLLECT.getArity())
{
                     throw new AlgebricksException("Incorrect number of arguments -> arity
is "
-                            + AsterixBuiltinFunctions.FEED_COLLECT.getArity() + ", not "
+ f.getArguments().size());
+                            + BuiltinFunctions.FEED_COLLECT.getArity() + ", not " + f.getArguments().size());
                 }
                 ILogicalExpression a1 = f.getArguments().get(5).getValue();
                 IAType t1 = (IAType) env.getType(a1);
@@ -126,7 +126,7 @@ public class MetadataBuiltinFunctions {
             }
         }, true);
 
-        AsterixBuiltinFunctions.addFunction(AsterixBuiltinFunctions.FEED_INTERCEPT, new IResultTypeComputer()
{
+        BuiltinFunctions.addFunction(BuiltinFunctions.FEED_INTERCEPT, new IResultTypeComputer()
{
 
             @Override
             public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment
env,

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f76d9c37/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMergeAggregationExpressionFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMergeAggregationExpressionFactory.java
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMergeAggregationExpressionFactory.java
index 40f042d..bd42fe1 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMergeAggregationExpressionFactory.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlMergeAggregationExpressionFactory.java
@@ -24,7 +24,7 @@ import java.util.List;
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.commons.lang3.mutable.MutableObject;
 
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.base.IOptimizationContext;
@@ -48,15 +48,15 @@ public class AqlMergeAggregationExpressionFactory implements IMergeAggregationEx
         /**
          * For global aggregate, the merge function is ALWAYS the same as the original aggregate
function.
          */
-        FunctionIdentifier mergeFid = AsterixBuiltinFunctions.isGlobalAggregateFunction(fid)
? fid
-                : AsterixBuiltinFunctions.getIntermediateAggregateFunction(fid);
+        FunctionIdentifier mergeFid = BuiltinFunctions.isGlobalAggregateFunction(fid) ? fid
+                : BuiltinFunctions.getIntermediateAggregateFunction(fid);
         if (mergeFid == null) {
             /**
              * In this case, no merge function (unimplemented) for the local-side aggregate
function
              */
             return null;
         }
-        ILogicalExpression aggExpr = AsterixBuiltinFunctions.makeAggregateFunctionExpression(mergeFid,
arguments);
+        ILogicalExpression aggExpr = BuiltinFunctions.makeAggregateFunctionExpression(mergeFid,
arguments);
         return aggExpr;
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f76d9c37/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
index fe5a3e0..ae2ea87 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/AqlPartialAggregationTypeComputer.java
@@ -18,7 +18,7 @@
  */
 package org.apache.asterix.dataflow.data.common;
 
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
+import org.apache.asterix.om.functions.BuiltinFunctions;
 import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
 import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
@@ -35,17 +35,17 @@ public class AqlPartialAggregationTypeComputer implements IPartialAggregationTyp
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
         AggregateFunctionCallExpression agg = (AggregateFunctionCallExpression) expr;
         FunctionIdentifier partialFid = agg.getFunctionIdentifier();
-        if (partialFid.equals(AsterixBuiltinFunctions.SERIAL_GLOBAL_AVG)) {
-            partialFid = AsterixBuiltinFunctions.SERIAL_LOCAL_AVG;
+        if (partialFid.equals(BuiltinFunctions.SERIAL_GLOBAL_AVG)) {
+            partialFid = BuiltinFunctions.SERIAL_LOCAL_AVG;
         }
-        AggregateFunctionCallExpression partialAgg = AsterixBuiltinFunctions.makeAggregateFunctionExpression(partialFid,
+        AggregateFunctionCallExpression partialAgg = BuiltinFunctions.makeAggregateFunctionExpression(partialFid,
                 agg.getArguments());
         return getTypeForFunction(partialAgg, env, metadataProvider);
     }
 
     private Object getTypeForFunction(AbstractFunctionCallExpression expr, IVariableTypeEnvironment
env,
             IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
-        return AsterixBuiltinFunctions.getResultTypeComputer(expr.getFunctionIdentifier()).computeType(expr,
env,
+        return BuiltinFunctions.getResultTypeComputer(expr.getFunctionIdentifier()).computeType(expr,
env,
                 metadataProvider);
     }
 }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/f76d9c37/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/ExpressionTypeComputer.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/ExpressionTypeComputer.java
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/ExpressionTypeComputer.java
index c55e796..5933dd9 100644
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/ExpressionTypeComputer.java
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/common/ExpressionTypeComputer.java
@@ -20,8 +20,8 @@ package org.apache.asterix.dataflow.data.common;
 
 import org.apache.asterix.common.functions.FunctionSignature;
 import org.apache.asterix.om.constants.AsterixConstantValue;
-import org.apache.asterix.om.functions.AsterixBuiltinFunctions;
-import org.apache.asterix.om.functions.AsterixExternalFunctionInfo;
+import org.apache.asterix.om.functions.BuiltinFunctions;
+import org.apache.asterix.om.functions.ExternalFunctionInfo;
 import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
 import org.apache.asterix.om.types.BuiltinType;
 import org.apache.asterix.om.types.IAType;
@@ -69,10 +69,10 @@ public class ExpressionTypeComputer implements IExpressionTypeComputer
{
         // Note: built-in functions + udfs
         IResultTypeComputer rtc;
         FunctionSignature signature = new FunctionSignature(fi.getNamespace(), fi.getName(),
fi.getArity());
-        if (AsterixBuiltinFunctions.isBuiltinCompilerFunction(signature, true)) {
-            rtc = AsterixBuiltinFunctions.getResultTypeComputer(fi);
+        if (BuiltinFunctions.isBuiltinCompilerFunction(signature, true)) {
+            rtc = BuiltinFunctions.getResultTypeComputer(fi);
         } else {
-            rtc = ((AsterixExternalFunctionInfo) expr.getFunctionInfo()).getResultTypeComputer();
+            rtc = ((ExternalFunctionInfo) expr.getFunctionInfo()).getResultTypeComputer();
         }
         if (rtc == null) {
             throw new AlgebricksException("Type computer missing for " + fi);


Mime
View raw message