fix for issue 376: Need to classify and properly treat all built-in functions in AQL
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java
index 09fc2b9..854ec9f 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlExpressionToPlanTranslator.java
@@ -91,6 +91,7 @@
import edu.uci.ics.asterix.om.base.AString;
import edu.uci.ics.asterix.om.constants.AsterixConstantValue;
import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions.FunctionNamespace;
import edu.uci.ics.asterix.om.functions.AsterixFunctionInfo;
import edu.uci.ics.asterix.om.types.BuiltinType;
import edu.uci.ics.asterix.om.types.IAType;
@@ -504,10 +505,14 @@
if (builtinAquafi != null) {
fi = builtinAquafi;
} else {
- fi = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, functionName, arity);
+ fi = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(), functionName, arity);
afi = AsterixBuiltinFunctions.lookupFunction(fi);
if (afi == null) {
- return null;
+ fi = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(), functionName, arity);
+ afi = AsterixBuiltinFunctions.lookupFunction(fi);
+ if (afi == null) {
+ return null;
+ }
}
}
if (AsterixBuiltinFunctions.isBuiltinAggregateFunction(fi)) {
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlPlusExpressionToPlanTranslator.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlPlusExpressionToPlanTranslator.java
index 9f28113..92add99 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlPlusExpressionToPlanTranslator.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/AqlPlusExpressionToPlanTranslator.java
@@ -89,6 +89,7 @@
import edu.uci.ics.asterix.om.base.AString;
import edu.uci.ics.asterix.om.constants.AsterixConstantValue;
import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions.FunctionNamespace;
import edu.uci.ics.asterix.om.functions.AsterixFunctionInfo;
import edu.uci.ics.asterix.om.types.ARecordType;
import edu.uci.ics.asterix.om.types.BuiltinType;
@@ -464,10 +465,14 @@
if (builtinAquafi != null) {
fi = builtinAquafi;
} else {
- fi = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, signature.getName());
+ fi = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(), signature.getName());
FunctionIdentifier builtinAsterixFi = AsterixBuiltinFunctions.getBuiltinFunctionIdentifier(fi);
if (builtinAsterixFi != null) {
fi = builtinAsterixFi;
+ } else {
+ fi = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(), signature.getName());
+ builtinAsterixFi = AsterixBuiltinFunctions.getBuiltinFunctionIdentifier(fi);
+ fi = builtinAsterixFi;
}
}
AbstractFunctionCallExpression f;
diff --git a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/CompiledStatements.java b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/CompiledStatements.java
index 6cf8d28..a91f2eb 100644
--- a/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/CompiledStatements.java
+++ b/asterix-algebra/src/main/java/edu/uci/ics/asterix/translator/CompiledStatements.java
@@ -35,10 +35,10 @@
import edu.uci.ics.asterix.aql.expression.WhereClause;
import edu.uci.ics.asterix.aql.literal.StringLiteral;
import edu.uci.ics.asterix.common.config.DatasetConfig.IndexType;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.common.functions.FunctionSignature;
import edu.uci.ics.asterix.metadata.declared.AqlMetadataProvider;
import edu.uci.ics.asterix.metadata.entities.Dataset;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.types.ARecordType;
import edu.uci.ics.asterix.om.types.IAType;
import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
@@ -495,8 +495,8 @@
LiteralExpr argumentLiteral = new LiteralExpr(new StringLiteral(arg));
arguments.add(argumentLiteral);
- CallExpr callExpression = new CallExpr(new FunctionSignature(FunctionConstants.ASTERIX_NS, "dataset", 1),
- arguments);
+ CallExpr callExpression = new CallExpr(new FunctionSignature(
+ AsterixBuiltinFunctions.FunctionNamespace.ASTERIX_PUBLIC.name(), "dataset", 1), arguments);
List<Clause> clauseList = new ArrayList<Clause>();
Clause forClause = new ForClause(var, callExpression);
clauseList.add(forClause);
diff --git a/asterix-app/src/main/resources/asterix-build-configuration.xml b/asterix-app/src/main/resources/asterix-build-configuration.xml
index bd984f0..f2d0992 100644
--- a/asterix-app/src/main/resources/asterix-build-configuration.xml
+++ b/asterix-app/src/main/resources/asterix-build-configuration.xml
@@ -9,8 +9,8 @@
<storeDirs>nc2data</storeDirs>
</store>
<property>
- <name>log_level</name>
- <value>WARNING</value>
+ <name>log.level</name>
+ <value>INFO</value>
<description></description>
</property>
</asterixConfiguration>
diff --git a/asterix-app/src/test/resources/optimizerts/ignore.txt b/asterix-app/src/test/resources/optimizerts/ignore.txt
index babe741..34d7259 100644
--- a/asterix-app/src/test/resources/optimizerts/ignore.txt
+++ b/asterix-app/src/test/resources/optimizerts/ignore.txt
@@ -1 +1,4 @@
-distinct_aggregate.aql
\ No newline at end of file
+distinct_aggregate.aql
+unnest_list_in_subplan.aql
+fj-phase2-with-hints.aql
+fj-dblp-csx.aql
diff --git a/asterix-app/src/test/resources/runtimets/testsuite.xml b/asterix-app/src/test/resources/runtimets/testsuite.xml
index 6cb0ecc..6759a6f 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite.xml
@@ -1486,6 +1486,7 @@
</test-group>
-->
<test-group name="fuzzyjoin">
+ <!-- internal function
<test-case FilePath="fuzzyjoin">
<compilation-unit name="dblp-1_1">
<output-dir compare="Text">dblp-1_1</output-dir>
@@ -1506,6 +1507,8 @@
<output-dir compare="Text">dblp-1_2</output-dir>
</compilation-unit>
</test-case>
+ -->
+ <!-- internal function
<test-case FilePath="fuzzyjoin">
<compilation-unit name="dblp-2.1_5.3.1">
<output-dir compare="Text">dblp-2.1_5.3.1</output-dir>
@@ -1576,6 +1579,7 @@
<output-dir compare="Text">dblp-3_1</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="fuzzyjoin">
<compilation-unit name="dblp-aqlplus_1">
<output-dir compare="Text">dblp-aqlplus_1</output-dir>
@@ -1587,6 +1591,7 @@
<expected-error>edu.uci.ics.asterix.common.exceptions.AsterixException</expected-error>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="fuzzyjoin">
<compilation-unit name="dblp-csx-2_1">
<output-dir compare="Text">dblp-csx-2_1</output-dir>
@@ -1687,6 +1692,7 @@
<output-dir compare="Text">dblp-csx-3_5</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="fuzzyjoin">
<compilation-unit name="dblp-csx-aqlplus_1">
<output-dir compare="Text">dblp-csx-aqlplus_1</output-dir>
@@ -1773,11 +1779,13 @@
<output-dir compare="Text">fuzzy-inverted-index-ngram-edit-distance</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="index-selection">
<compilation-unit name="fuzzy-inverted-index-ngram-jaccard">
<output-dir compare="Text">fuzzy-inverted-index-ngram-jaccard</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="index-selection">
<compilation-unit name="fuzzy-inverted-index-olist-edit-distance-panic">
<output-dir compare="Text">fuzzy-inverted-index-olist-edit-distance-panic</output-dir>
@@ -1823,11 +1831,13 @@
<output-dir compare="Text">inverted-index-ngram-edit-distance</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="index-selection">
<compilation-unit name="inverted-index-ngram-jaccard">
<output-dir compare="Text">inverted-index-ngram-jaccard</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="index-selection">
<compilation-unit name="inverted-index-olist-edit-distance-panic">
<output-dir compare="Text">inverted-index-olist-edit-distance-panic</output-dir>
@@ -1915,16 +1925,20 @@
<output-dir compare="Text">ngram-edit-distance-inline</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="inverted-index-join">
<compilation-unit name="ngram-jaccard">
<output-dir compare="Text">ngram-jaccard</output-dir>
</compilation-unit>
</test-case>
+ -->
+ <!-- internal function
<test-case FilePath="inverted-index-join">
<compilation-unit name="ngram-jaccard-inline">
<output-dir compare="Text">ngram-jaccard-inline</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="inverted-index-join">
<compilation-unit name="olist-edit-distance">
<output-dir compare="Text">olist-edit-distance</output-dir>
@@ -1977,6 +1991,7 @@
<output-dir compare="Text">ngram-edit-distance-inline</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="inverted-index-join-noeqjoin">
<compilation-unit name="ngram-jaccard">
<output-dir compare="Text">ngram-jaccard</output-dir>
@@ -1987,6 +2002,7 @@
<output-dir compare="Text">ngram-jaccard-inline</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="inverted-index-join-noeqjoin">
<compilation-unit name="olist-edit-distance">
<output-dir compare="Text">olist-edit-distance</output-dir>
@@ -2142,11 +2158,13 @@
<output-dir compare="Text">nested-loop-join_01</output-dir>
</compilation-unit>
</test-case>
+ <!--
<test-case FilePath="misc">
<compilation-unit name="range_01">
<output-dir compare="Text">range_01</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="misc">
<compilation-unit name="tid_01">
<output-dir compare="Text">tid_01</output-dir>
@@ -2765,6 +2783,7 @@
</test-case>
</test-group>
<test-group name="records">
+ <!-- internal function
<test-case FilePath="records">
<compilation-unit name="closed-record-constructor_01">
<output-dir compare="Text">closed-record-constructor_01</output-dir>
@@ -2780,21 +2799,25 @@
<output-dir compare="Text">closed-record-constructor_03</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="records">
<compilation-unit name="expFieldName">
<output-dir compare="Text">expFieldName</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="records">
<compilation-unit name="field-access-by-index_01">
<output-dir compare="Text">field-access-by-index_01</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="records">
<compilation-unit name="field-access-on-open-field">
<output-dir compare="Text">field-access-on-open-field</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="records">
<compilation-unit name="open-record-constructor_01">
<output-dir compare="Text">open-record-constructor_01</output-dir>
@@ -2805,6 +2828,7 @@
<output-dir compare="Text">open-record-constructor_02</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="records">
<compilation-unit name="closed-closed-fieldname-conflict_issue173">
<output-dir compare="Text">closed-closed-fieldname-conflict_issue173</output-dir>
@@ -2924,6 +2948,7 @@
<output-dir compare="Text">edit-distance-check_strings</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="similarity">
<compilation-unit name="edit-distance-list-is-filterable">
<output-dir compare="Text">edit-distance-list-is-filterable</output-dir>
@@ -2934,6 +2959,7 @@
<output-dir compare="Text">edit-distance-string-is-filterable</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="similarity">
<compilation-unit name="edit-distance_ints">
<output-dir compare="Text">edit-distance_ints</output-dir>
@@ -2954,11 +2980,13 @@
<output-dir compare="Text">fuzzyeq-similarity-jaccard</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="similarity">
<compilation-unit name="prefix-len-jaccard">
<output-dir compare="Text">prefix-len-jaccard</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="similarity">
<compilation-unit name="similarity-jaccard-check_ints">
<output-dir compare="Text">similarity-jaccard-check_ints</output-dir>
@@ -2974,6 +3002,7 @@
<output-dir compare="Text">similarity-jaccard-check_strings</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="similarity">
<compilation-unit name="similarity-jaccard-prefix-check">
<output-dir compare="Text">similarity-jaccard-prefix-check</output-dir>
@@ -2999,6 +3028,8 @@
<output-dir compare="Text">similarity-jaccard-sorted-check_strings</output-dir>
</compilation-unit>
</test-case>
+ -->
+ <!-- internal functions
<test-case FilePath="similarity">
<compilation-unit name="similarity-jaccard-sorted_ints">
<output-dir compare="Text">similarity-jaccard-sorted_ints</output-dir>
@@ -3029,6 +3060,7 @@
<output-dir compare="Text">similarity-jaccard_strings</output-dir>
</compilation-unit>
</test-case>
+ -->
</test-group>
<test-group name="spatial">
<test-case FilePath="spatial">
@@ -3410,6 +3442,7 @@
<output-dir compare="Text">string-concat1</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="string">
<compilation-unit name="string-equal1">
<output-dir compare="Text">string-equal1</output-dir>
@@ -3430,6 +3463,7 @@
<output-dir compare="Text">string-equal4</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="string">
<compilation-unit name="string-join1">
<output-dir compare="Text">string-join1</output-dir>
@@ -3568,6 +3602,7 @@
</compilation-unit>
</test-case>
</test-group>
+ <!-- internal function
<test-group name="subset-collection">
<test-case FilePath="subset-collection">
<compilation-unit name="01">
@@ -3584,13 +3619,11 @@
<output-dir compare="Text">03</output-dir>
</compilation-unit>
</test-case>
- <!--
<test-case FilePath="subset-collection">
<compilation-unit name="04">
<output-dir compare="Text">04</output-dir>
</compilation-unit>
</test-case>
- -->
<test-case FilePath="subset-collection">
<compilation-unit name="05">
<output-dir compare="Text">05</output-dir>
@@ -3607,7 +3640,9 @@
</compilation-unit>
</test-case>
</test-group>
+ -->
<test-group name="tokenizers">
+ <!-- internal function
<test-case FilePath="tokenizers">
<compilation-unit name="counthashed-gram-tokens_01">
<output-dir compare="Text">counthashed-gram-tokens_01</output-dir>
@@ -3623,6 +3658,8 @@
<output-dir compare="Text">counthashed-word-tokens_01</output-dir>
</compilation-unit>
</test-case>
+ -->
+ <!-- internal function
<test-case FilePath="tokenizers">
<compilation-unit name="gram-tokens_01">
<output-dir compare="Text">gram-tokens_01</output-dir>
@@ -3633,6 +3670,8 @@
<output-dir compare="Text">gram-tokens_02</output-dir>
</compilation-unit>
</test-case>
+ -->
+ <!-- internal function
<test-case FilePath="tokenizers">
<compilation-unit name="hashed-gram-tokens_01">
<output-dir compare="Text">hashed-gram-tokens_01</output-dir>
@@ -3648,6 +3687,7 @@
<output-dir compare="Text">hashed-word-tokens_01</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="tokenizers">
<compilation-unit name="word-tokens_01">
<output-dir compare="Text">word-tokens_01</output-dir>
@@ -3720,11 +3760,13 @@
<output-dir compare="Text">q18_large_volume_customer</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="tpch">
<compilation-unit name="q19_discounted_revenue">
<output-dir compare="Text">q19_discounted_revenue</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="tpch">
<compilation-unit name="q1_pricing_summary_report_nt">
<output-dir compare="Text">q1_pricing_summary_report_nt</output-dir>
@@ -3906,11 +3948,13 @@
</test-case>
</test-group>
<test-group name="user-defined-functions">
+ <!-- internal function
<test-case FilePath="user-defined-functions">
<compilation-unit name="query-issue201">
<output-dir compare="Text">query-issue201</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="user-defined-functions">
<compilation-unit name="udf01">
<output-dir compare="Text">udf01</output-dir>
@@ -4173,6 +4217,7 @@
<output-dir compare="Text">adjust_timezone</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="temporal">
<compilation-unit name="calendar_duration">
<output-dir compare="Text">calendar_duration</output-dir>
@@ -4188,11 +4233,14 @@
<output-dir compare="Text">datetime_functions</output-dir>
</compilation-unit>
</test-case>
-<!-- <test-case FilePath="temporal">
- <compilation-unit name="insert_from_delimited_ds">
- <output-dir compare="Text">insert_from_delimited_ds</output-dir>
- </compilation-unit>
- </test-case> -->
+ -->
+ <!--
+ <test-case FilePath="temporal">
+ <compilation-unit name="insert_from_delimited_ds">
+ <output-dir compare="Text">insert_from_delimited_ds</output-dir>
+ </compilation-unit>
+ </test-case>
+ -->
<test-case FilePath="temporal">
<compilation-unit name="insert_from_ext_ds">
<output-dir compare="Text">insert_from_ext_ds</output-dir>
@@ -4203,21 +4251,25 @@
<output-dir compare="Text">interval_functions</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal functions
<test-case FilePath="temporal">
<compilation-unit name="time_functions">
<output-dir compare="Text">time_functions</output-dir>
</compilation-unit>
</test-case>
+ -->
<test-case FilePath="constructor">
<compilation-unit name="interval">
<output-dir compare="Text">interval</output-dir>
</compilation-unit>
</test-case>
+ <!-- internal function
<test-case FilePath="temporal">
<compilation-unit name="duration_comps">
<output-dir compare="Text">duration_comps</output-dir>
</compilation-unit>
</test-case>
+ -->
</test-group>
<test-group name="leftouterjoin">
<test-case FilePath="leftouterjoin">
diff --git a/asterix-aql/src/main/java/edu/uci/ics/asterix/aql/rewrites/AqlRewriter.java b/asterix-aql/src/main/java/edu/uci/ics/asterix/aql/rewrites/AqlRewriter.java
index 84d8321..e9aab27 100644
--- a/asterix-aql/src/main/java/edu/uci/ics/asterix/aql/rewrites/AqlRewriter.java
+++ b/asterix-aql/src/main/java/edu/uci/ics/asterix/aql/rewrites/AqlRewriter.java
@@ -66,7 +66,6 @@
import edu.uci.ics.asterix.aql.expression.visitor.IAqlExpressionVisitor;
import edu.uci.ics.asterix.aql.util.FunctionUtils;
import edu.uci.ics.asterix.common.exceptions.AsterixException;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.common.functions.FunctionSignature;
import edu.uci.ics.asterix.metadata.MetadataManager;
import edu.uci.ics.asterix.metadata.MetadataTransactionContext;
@@ -169,7 +168,7 @@
buildOtherUdfs(functionDecl.getFuncBody(), functionDecls, declaredFunctions);
}
} else {
- if (isBuiltinFunction(signature)) {
+ if (isBuiltinFunction(signature, AsterixBuiltinFunctions.FunctionNamespace.ASTERIX_PUBLIC)) {
continue;
} else {
throw new AsterixException(" unknown function " + signature);
@@ -190,8 +189,9 @@
}
- private boolean isBuiltinFunction(FunctionSignature functionSignature) {
- if (AsterixBuiltinFunctions.isBuiltinCompilerFunction(new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ private boolean isBuiltinFunction(FunctionSignature functionSignature,
+ AsterixBuiltinFunctions.FunctionNamespace namespace) {
+ if (AsterixBuiltinFunctions.isBuiltinCompilerFunction(new FunctionIdentifier(namespace.name(),
functionSignature.getName(), functionSignature.getArity()))) {
return true;
}
diff --git a/asterix-events/pom.xml b/asterix-events/pom.xml
index 7b187bb..8440b6d 100644
--- a/asterix-events/pom.xml
+++ b/asterix-events/pom.xml
@@ -166,5 +166,12 @@
<artifactId>commons-io</artifactId>
<version>1.4</version>
</dependency>
+ <dependency>
+ <groupId>edu.uci.ics.asterix</groupId>
+ <artifactId>asterix-common</artifactId>
+ <version>0.0.6-SNAPSHOT</version>
+ <type>jar</type>
+ <scope>compile</scope>
+ </dependency>
</dependencies>
</project>
diff --git a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java
index 352d787..fa3923b 100644
--- a/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java
+++ b/asterix-events/src/main/java/edu/uci/ics/asterix/event/management/EventExecutor.java
@@ -24,6 +24,7 @@
import org.apache.commons.io.IOUtils;
+import edu.uci.ics.asterix.common.config.AsterixProperties;
import edu.uci.ics.asterix.event.driver.EventDriver;
import edu.uci.ics.asterix.event.schema.cluster.Cluster;
import edu.uci.ics.asterix.event.schema.cluster.Node;
@@ -53,7 +54,7 @@
if (p.getKey().equals("JAVA_HOME")) {
String val = node.getJavaHome() == null ? p.getValue() : node.getJavaHome();
envBuffer.append(p.getKey() + "=" + val + " ");
- } else if (p.getKey().equals("NC_JAVA_OPTS")) {
+ } else if (p.getKey().equals(AsterixProperties.AsterixConfigurationKeys.NC_JAVA_OPTS)) {
if (!isMasterNode) {
StringBuilder builder = new StringBuilder();
builder.append("\"");
@@ -64,7 +65,7 @@
builder.append("\"");
envBuffer.append("JAVA_OPTS" + "=" + builder + " ");
}
- } else if (p.getKey().equals("CC_JAVA_OPTS")) {
+ } else if (p.getKey().equals(AsterixProperties.AsterixConfigurationKeys.CC_JAVA_OPTS)) {
if (isMasterNode) {
StringBuilder builder = new StringBuilder();
builder.append("\"");
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
index c9395ca..ebd23d7 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/driver/InstallerUtil.java
@@ -97,9 +97,9 @@
}
for (edu.uci.ics.asterix.common.configuration.Property property : asterixConfiguration.getProperty()) {
if (property.getName().equalsIgnoreCase(AsterixInstance.CC_JAVA_OPTS)) {
- clusterProperties.add(new Property("CC_JAVA_OPTS", property.getValue()));
+ clusterProperties.add(new Property(AsterixInstance.CC_JAVA_OPTS, property.getValue()));
} else if (property.getName().equalsIgnoreCase(AsterixInstance.NC_JAVA_OPTS)) {
- clusterProperties.add(new Property("NC_JAVA_OPTS", property.getValue()));
+ clusterProperties.add(new Property(AsterixInstance.NC_JAVA_OPTS, property.getValue()));
}
}
clusterProperties.add(new Property("ASTERIX_HOME", cluster.getWorkingDir().getDir() + File.separator
diff --git a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
index 1eba89f..76182f6 100644
--- a/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
+++ b/asterix-installer/src/main/java/edu/uci/ics/asterix/installer/model/AsterixInstance.java
@@ -19,6 +19,7 @@
import java.util.Date;
import java.util.List;
+import edu.uci.ics.asterix.common.config.AsterixProperties;
import edu.uci.ics.asterix.common.configuration.AsterixConfiguration;
import edu.uci.ics.asterix.common.configuration.Property;
import edu.uci.ics.asterix.event.schema.cluster.Cluster;
@@ -28,8 +29,8 @@
private static final long serialVersionUID = 2874439550187520449L;
- public static final String CC_JAVA_OPTS = "cc_java_opts";
- public static final String NC_JAVA_OPTS = "nc_java_opts";
+ public static final String CC_JAVA_OPTS = AsterixProperties.AsterixConfigurationKeys.CC_JAVA_OPTS;
+ public static final String NC_JAVA_OPTS = AsterixProperties.AsterixConfigurationKeys.NC_JAVA_OPTS;
public enum State {
ACTIVE,
diff --git a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
index 2be7fbd1..714bf3b 100644
--- a/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
+++ b/asterix-om/src/main/java/edu/uci/ics/asterix/om/functions/AsterixBuiltinFunctions.java
@@ -8,7 +8,6 @@
import org.apache.commons.lang3.mutable.Mutable;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.om.typecomputer.base.IResultTypeComputer;
import edu.uci.ics.asterix.om.typecomputer.impl.ABooleanTypeComputer;
import edu.uci.ics.asterix.om.typecomputer.impl.ACircleTypeComputer;
@@ -102,6 +101,14 @@
SI
}
+ /*
+ * A function is categorized as public or private depending upon whether it can be used by the end-user in AQL queries.
+ */
+ public enum FunctionNamespace {
+ ASTERIX_PUBLIC,
+ ASTERIX_PRIVATE
+ }
+
private static final FunctionInfoRepository finfoRepo = new FunctionInfoRepository();
// it is supposed to be an identity mapping
@@ -117,419 +124,438 @@
private final static Map<IFunctionInfo, IFunctionInfo> scalarToAggregateFunctionMap = new HashMap<IFunctionInfo, IFunctionInfo>();
private static final Map<IFunctionInfo, SpatialFilterKind> spatialFilterFunctions = new HashMap<IFunctionInfo, SpatialFilterKind>();
- public final static FunctionIdentifier TYPE_OF = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "type-of", 1);
- public final static FunctionIdentifier GET_HANDLE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "get-handle", 2);
- public final static FunctionIdentifier GET_DATA = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-data",
- 2);
- public final static FunctionIdentifier EMBED_TYPE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "embed-type", 1);
+ public final static FunctionIdentifier TYPE_OF = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "type-of", 1);
+ public final static FunctionIdentifier GET_HANDLE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "get-handle", 2);
+ public final static FunctionIdentifier GET_DATA = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "get-data", 2);
+ public final static FunctionIdentifier EMBED_TYPE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "embed-type", 1);
- public final static FunctionIdentifier GET_ITEM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-item",
- 2);
- public final static FunctionIdentifier ANY_COLLECTION_MEMBER = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "any-collection-member", 1);
- public final static FunctionIdentifier LISTIFY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "listify", 1);
+ public final static FunctionIdentifier GET_ITEM = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "get-item", 2);
+ public final static FunctionIdentifier ANY_COLLECTION_MEMBER = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "any-collection-member", 1);
+ public final static FunctionIdentifier LISTIFY = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "listify", 1);
// public final static FunctionIdentifier BAGIFY = new
// FunctionIdentifier(ASTERIX_NS, "bagify", 1, true);
- public final static FunctionIdentifier LEN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "len", 1);
+ public final static FunctionIdentifier LEN = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(), "len",
+ 1);
- public final static FunctionIdentifier CONCAT_NON_NULL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "concat-non-null", FunctionIdentifier.VARARGS);
- public final static FunctionIdentifier EMPTY_STREAM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "empty-stream", 0);
- public final static FunctionIdentifier NON_EMPTY_STREAM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "non-empty-stream", 0);
+ public final static FunctionIdentifier CONCAT_NON_NULL = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "concat-non-null", FunctionIdentifier.VARARGS);
+ public final static FunctionIdentifier EMPTY_STREAM = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "empty-stream", 0);
+ public final static FunctionIdentifier NON_EMPTY_STREAM = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "non-empty-stream", 0);
public final static FunctionIdentifier ORDERED_LIST_CONSTRUCTOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "ordered-list-constructor", FunctionIdentifier.VARARGS);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "ordered-list-constructor", FunctionIdentifier.VARARGS);
public final static FunctionIdentifier UNORDERED_LIST_CONSTRUCTOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "unordered-list-constructor", FunctionIdentifier.VARARGS);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "unordered-list-constructor", FunctionIdentifier.VARARGS);
// records
public final static FunctionIdentifier CLOSED_RECORD_CONSTRUCTOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "closed-record-constructor", FunctionIdentifier.VARARGS);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "closed-record-constructor", FunctionIdentifier.VARARGS);
public final static FunctionIdentifier OPEN_RECORD_CONSTRUCTOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "open-record-constructor", FunctionIdentifier.VARARGS);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "open-record-constructor", FunctionIdentifier.VARARGS);
public final static FunctionIdentifier RECORD_TYPE_CONSTRUCTOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "record-type-constructor", FunctionIdentifier.VARARGS);
- public final static FunctionIdentifier FIELD_ACCESS_BY_INDEX = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "field-access-by-index", 2);
- public final static FunctionIdentifier FIELD_ACCESS_BY_NAME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "field-access-by-name", 2);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "record-type-constructor", FunctionIdentifier.VARARGS);
+ public final static FunctionIdentifier FIELD_ACCESS_BY_INDEX = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "field-access-by-index", 2);
+ public final static FunctionIdentifier FIELD_ACCESS_BY_NAME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "field-access-by-name", 2);
- public final static FunctionIdentifier NUMERIC_UNARY_MINUS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-unary-minus", 1);
+ public final static FunctionIdentifier NUMERIC_UNARY_MINUS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-unary-minus", 1);
- public final static FunctionIdentifier NUMERIC_SUBTRACT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-subtract", 2);
- public final static FunctionIdentifier NUMERIC_MULTIPLY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-multiply", 2);
- public final static FunctionIdentifier NUMERIC_DIVIDE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-divide", 2);
- public final static FunctionIdentifier NUMERIC_MOD = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-mod", 2);
- public final static FunctionIdentifier NUMERIC_IDIV = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-idiv", 2);
- public final static FunctionIdentifier CARET = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "caret", 2);
+ public final static FunctionIdentifier NUMERIC_SUBTRACT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-subtract", 2);
+ public final static FunctionIdentifier NUMERIC_MULTIPLY = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-multiply", 2);
+ public final static FunctionIdentifier NUMERIC_DIVIDE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-divide", 2);
+ public final static FunctionIdentifier NUMERIC_MOD = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-mod", 2);
+ public final static FunctionIdentifier NUMERIC_IDIV = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-idiv", 2);
+ public final static FunctionIdentifier CARET = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "caret", 2);
- public final static FunctionIdentifier NUMERIC_ABS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-abs", 1);
- public final static FunctionIdentifier NUMERIC_CEILING = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-ceiling", 1);
- public final static FunctionIdentifier NUMERIC_FLOOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-floor", 1);
- public final static FunctionIdentifier NUMERIC_ROUND = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "numeric-round", 1);
+ public final static FunctionIdentifier NUMERIC_ABS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-abs", 1);
+ public final static FunctionIdentifier NUMERIC_CEILING = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-ceiling", 1);
+ public final static FunctionIdentifier NUMERIC_FLOOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-floor", 1);
+ public final static FunctionIdentifier NUMERIC_ROUND = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-round", 1);
public final static FunctionIdentifier NUMERIC_ROUND_HALF_TO_EVEN = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "numeric-round-half-to-even", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-round-half-to-even", 1);
public final static FunctionIdentifier NUMERIC_ROUND_HALF_TO_EVEN2 = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "numeric-round-half-to-even", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "numeric-round-half-to-even", 2);
// String funcitons
- public final static FunctionIdentifier STRING_EQUAL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "string-equal", 2);
- public final static FunctionIdentifier STRING_START_WITH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "start-with", 2);
- public final static FunctionIdentifier STRING_END_WITH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "end-with", 2);
- public final static FunctionIdentifier STRING_MATCHES = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "matches", 2);
+ public final static FunctionIdentifier STRING_EQUAL = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "string-equal", 2);
+ public final static FunctionIdentifier STRING_START_WITH = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "start-with", 2);
+ public final static FunctionIdentifier STRING_END_WITH = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "end-with", 2);
+ public final static FunctionIdentifier STRING_MATCHES = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "matches", 2);
public final static FunctionIdentifier STRING_MATCHES_WITH_FLAG = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "matches", 3);
- public final static FunctionIdentifier STRING_LOWERCASE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "lowercase", 1);
- public final static FunctionIdentifier STRING_REPLACE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "replace", 3);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "matches", 3);
+ public final static FunctionIdentifier STRING_LOWERCASE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "lowercase", 1);
+ public final static FunctionIdentifier STRING_REPLACE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "replace", 3);
public final static FunctionIdentifier STRING_REPLACE_WITH_FLAG = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "replace", 4);
- public final static FunctionIdentifier STRING_LENGTH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "string-length", 1);
- public final static FunctionIdentifier SUBSTRING2 = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "replace", 4);
+ public final static FunctionIdentifier STRING_LENGTH = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "string-length", 1);
+ public final static FunctionIdentifier SUBSTRING2 = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
"substring", 2);
- public final static FunctionIdentifier SUBSTRING_BEFORE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "substring-before", 2);
- public final static FunctionIdentifier SUBSTRING_AFTER = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "substring-after", 2);
- public final static FunctionIdentifier STRING_TO_CODEPOINT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "string-to-codepoint", 1);
- public final static FunctionIdentifier CODEPOINT_TO_STRING = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "codepoint-to-string", 1);
- public final static FunctionIdentifier STRING_CONCAT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "string-concat", 1);
- public final static FunctionIdentifier STRING_JOIN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "string-join", 2);
+ public final static FunctionIdentifier SUBSTRING_BEFORE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "substring-before", 2);
+ public final static FunctionIdentifier SUBSTRING_AFTER = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "substring-after", 2);
+ public final static FunctionIdentifier STRING_TO_CODEPOINT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "string-to-codepoint", 1);
+ public final static FunctionIdentifier CODEPOINT_TO_STRING = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "codepoint-to-string", 1);
+ public final static FunctionIdentifier STRING_CONCAT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "string-concat", 1);
+ public final static FunctionIdentifier STRING_JOIN = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "string-join", 2);
- public final static FunctionIdentifier DATASET = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "dataset", 1);
- public final static FunctionIdentifier FEED_INGEST = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "feed-ingest", 1);
+ public final static FunctionIdentifier DATASET = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "dataset", 1);
+ public final static FunctionIdentifier FEED_INGEST = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "feed-ingest", 1);
- public final static FunctionIdentifier INDEX_SEARCH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "index-search", FunctionIdentifier.VARARGS);
+ public final static FunctionIdentifier INDEX_SEARCH = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "index-search", FunctionIdentifier.VARARGS);
public final static FunctionIdentifier MAKE_FIELD_INDEX_HANDLE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "make-field-index-handle", 2);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "make-field-index-handle", 2);
public final static FunctionIdentifier MAKE_FIELD_NAME_HANDLE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "make-field-name-handle", 1);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "make-field-name-handle", 1);
- public final static FunctionIdentifier SUBSTRING = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier SUBSTRING = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
"substring", 3);
- public final static FunctionIdentifier LIKE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "like", 2);
- public final static FunctionIdentifier CONTAINS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "contains",
- 2);
- public final static FunctionIdentifier STARTS_WITH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "starts-with", 2);
- public final static FunctionIdentifier ENDS_WITH = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier LIKE = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "like", 2);
+ public final static FunctionIdentifier CONTAINS = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "contains", 2);
+ public final static FunctionIdentifier STARTS_WITH = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "starts-with", 2);
+ public final static FunctionIdentifier ENDS_WITH = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
"ends-with", 2);
- public final static FunctionIdentifier AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-avg", 1);
- public final static FunctionIdentifier COUNT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-count", 1);
- public final static FunctionIdentifier SUM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-sum", 1);
- public final static FunctionIdentifier LOCAL_SUM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier AVG = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "agg-avg", 1);
+ public final static FunctionIdentifier COUNT = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "agg-count", 1);
+ public final static FunctionIdentifier SUM = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "agg-sum", 1);
+ public final static FunctionIdentifier LOCAL_SUM = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
"agg-local-sum", 1);
- public final static FunctionIdentifier MAX = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-max", 1);
- public final static FunctionIdentifier LOCAL_MAX = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier MAX = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "agg-max", 1);
+ public final static FunctionIdentifier LOCAL_MAX = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
"agg-local-max", 1);
- public final static FunctionIdentifier MIN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-min", 1);
- public final static FunctionIdentifier LOCAL_MIN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier MIN = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "agg-min", 1);
+ public final static FunctionIdentifier LOCAL_MIN = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
"agg-local-min", 1);
- public final static FunctionIdentifier GLOBAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "agg-global-avg", 1);
- public final static FunctionIdentifier LOCAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier GLOBAL_AVG = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "agg-global-avg", 1);
+ public final static FunctionIdentifier LOCAL_AVG = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
"agg-local-avg", 1);
- public final static FunctionIdentifier SCALAR_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "avg", 1);
- public final static FunctionIdentifier SCALAR_COUNT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "count",
- 1);
- public final static FunctionIdentifier SCALAR_SUM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sum", 1);
- public final static FunctionIdentifier SCALAR_MAX = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "max", 1);
- public final static FunctionIdentifier SCALAR_MIN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "min", 1);
- public final static FunctionIdentifier SCALAR_GLOBAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "global-avg", 1);
- public final static FunctionIdentifier SCALAR_LOCAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "local-avg", 1);
+ public final static FunctionIdentifier SCALAR_AVG = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "avg", 1);
+ public final static FunctionIdentifier SCALAR_COUNT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "count", 1);
+ public final static FunctionIdentifier SCALAR_SUM = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "sum", 1);
+ public final static FunctionIdentifier SCALAR_MAX = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "max", 1);
+ public final static FunctionIdentifier SCALAR_MIN = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "min", 1);
+ public final static FunctionIdentifier SCALAR_GLOBAL_AVG = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "global-avg", 1);
+ public final static FunctionIdentifier SCALAR_LOCAL_AVG = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "local-avg", 1);
// serializable aggregate functions
- public final static FunctionIdentifier SERIAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "avg-serial", 1);
- public final static FunctionIdentifier SERIAL_COUNT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "count-serial", 1);
- public final static FunctionIdentifier SERIAL_SUM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "sum-serial", 1);
- public final static FunctionIdentifier SERIAL_LOCAL_SUM = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "local-sum-serial", 1);
- public final static FunctionIdentifier SERIAL_GLOBAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "global-avg-serial", 1);
- public final static FunctionIdentifier SERIAL_LOCAL_AVG = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "local-avg-serial", 1);
+ public final static FunctionIdentifier SERIAL_AVG = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "avg-serial", 1);
+ public final static FunctionIdentifier SERIAL_COUNT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "count-serial", 1);
+ public final static FunctionIdentifier SERIAL_SUM = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "sum-serial", 1);
+ public final static FunctionIdentifier SERIAL_LOCAL_SUM = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "local-sum-serial", 1);
+ public final static FunctionIdentifier SERIAL_GLOBAL_AVG = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "global-avg-serial", 1);
+ public final static FunctionIdentifier SERIAL_LOCAL_AVG = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "local-avg-serial", 1);
- public final static FunctionIdentifier SCAN_COLLECTION = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "scan-collection", 1);
- public final static FunctionIdentifier SUBSET_COLLECTION = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "subset-collection", 3);
+ public final static FunctionIdentifier SCAN_COLLECTION = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "scan-collection", 1);
+ public final static FunctionIdentifier SUBSET_COLLECTION = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "subset-collection", 3);
- public final static FunctionIdentifier RANGE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "range", 2);
+ public final static FunctionIdentifier RANGE = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "range", 2);
// fuzzy functions:
- public final static FunctionIdentifier FUZZY_EQ = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "fuzzy-eq",
- 2);
+ public final static FunctionIdentifier FUZZY_EQ = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "fuzzy-eq", 2);
- public final static FunctionIdentifier PREFIX_LEN_JACCARD = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "prefix-len-jaccard", 2);
+ public final static FunctionIdentifier PREFIX_LEN_JACCARD = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "prefix-len-jaccard", 2);
- public final static FunctionIdentifier SIMILARITY_JACCARD = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "similarity-jaccard", 2);
+ public final static FunctionIdentifier SIMILARITY_JACCARD = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "similarity-jaccard", 2);
public final static FunctionIdentifier SIMILARITY_JACCARD_CHECK = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "similarity-jaccard-check", 3);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "similarity-jaccard-check", 3);
public final static FunctionIdentifier SIMILARITY_JACCARD_SORTED = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "similarity-jaccard-sorted", 2);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "similarity-jaccard-sorted", 2);
public final static FunctionIdentifier SIMILARITY_JACCARD_SORTED_CHECK = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "similarity-jaccard-sorted-check", 3);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "similarity-jaccard-sorted-check", 3);
public final static FunctionIdentifier SIMILARITY_JACCARD_PREFIX = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "similarity-jaccard-prefix", 6);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "similarity-jaccard-prefix", 6);
public final static FunctionIdentifier SIMILARITY_JACCARD_PREFIX_CHECK = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "similarity-jaccard-prefix-check", 6);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "similarity-jaccard-prefix-check", 6);
- public final static FunctionIdentifier EDIT_DISTANCE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "edit-distance", 2);
- public final static FunctionIdentifier EDIT_DISTANCE_CHECK = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "edit-distance-check", 3);
+ public final static FunctionIdentifier EDIT_DISTANCE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "edit-distance", 2);
+ public final static FunctionIdentifier EDIT_DISTANCE_CHECK = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "edit-distance-check", 3);
public final static FunctionIdentifier EDIT_DISTANCE_LIST_IS_FILTERABLE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "edit-distance-list-is-filterable", 2);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "edit-distance-list-is-filterable", 2);
public final static FunctionIdentifier EDIT_DISTANCE_STRING_IS_FILTERABLE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "edit-distance-string-is-filterable", 4);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "edit-distance-string-is-filterable", 4);
// tokenizers:
- public final static FunctionIdentifier WORD_TOKENS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "word-tokens", 1);
- public final static FunctionIdentifier HASHED_WORD_TOKENS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "hashed-word-tokens", 1);
+ public final static FunctionIdentifier WORD_TOKENS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "word-tokens", 1);
+ public final static FunctionIdentifier HASHED_WORD_TOKENS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "hashed-word-tokens", 1);
public final static FunctionIdentifier COUNTHASHED_WORD_TOKENS = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "counthashed-word-tokens", 1);
- public final static FunctionIdentifier GRAM_TOKENS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "gram-tokens", 3);
- public final static FunctionIdentifier HASHED_GRAM_TOKENS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "hashed-gram-tokens", 3);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "counthashed-word-tokens", 1);
+ public final static FunctionIdentifier GRAM_TOKENS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "gram-tokens", 3);
+ public final static FunctionIdentifier HASHED_GRAM_TOKENS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "hashed-gram-tokens", 3);
public final static FunctionIdentifier COUNTHASHED_GRAM_TOKENS = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "counthashed-gram-tokens", 3);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "counthashed-gram-tokens", 3);
- public final static FunctionIdentifier TID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "tid", 0);
+ public final static FunctionIdentifier TID = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(), "tid",
+ 0);
// constructors:
- public final static FunctionIdentifier BOOLEAN_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "boolean", 1);
- public final static FunctionIdentifier NULL_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "null", 1);
- public final static FunctionIdentifier STRING_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "string", 1);
- public final static FunctionIdentifier INT8_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "int8", 1);
- public final static FunctionIdentifier INT16_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "int16", 1);
- public final static FunctionIdentifier INT32_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "int32", 1);
- public final static FunctionIdentifier INT64_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "int64", 1);
- public final static FunctionIdentifier FLOAT_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "float", 1);
- public final static FunctionIdentifier DOUBLE_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "double", 1);
- public final static FunctionIdentifier POINT_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "point", 1);
- public final static FunctionIdentifier POINT3D_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "point3d", 1);
- public final static FunctionIdentifier LINE_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "line", 1);
- public final static FunctionIdentifier CIRCLE_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "circle", 1);
- public final static FunctionIdentifier RECTANGLE_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "rectangle", 1);
- public final static FunctionIdentifier POLYGON_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "polygon", 1);
- public final static FunctionIdentifier TIME_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "time", 1);
- public final static FunctionIdentifier DATE_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "date", 1);
- public final static FunctionIdentifier DATETIME_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "datetime", 1);
- public final static FunctionIdentifier DURATION_CONSTRUCTOR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "duration", 1);
+ public final static FunctionIdentifier BOOLEAN_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "boolean", 1);
+ public final static FunctionIdentifier NULL_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "null", 1);
+ public final static FunctionIdentifier STRING_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "string", 1);
+ public final static FunctionIdentifier INT8_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "int8", 1);
+ public final static FunctionIdentifier INT16_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "int16", 1);
+ public final static FunctionIdentifier INT32_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "int32", 1);
+ public final static FunctionIdentifier INT64_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "int64", 1);
+ public final static FunctionIdentifier FLOAT_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "float", 1);
+ public final static FunctionIdentifier DOUBLE_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "double", 1);
+ public final static FunctionIdentifier POINT_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "point", 1);
+ public final static FunctionIdentifier POINT3D_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "point3d", 1);
+ public final static FunctionIdentifier LINE_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "line", 1);
+ public final static FunctionIdentifier CIRCLE_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "circle", 1);
+ public final static FunctionIdentifier RECTANGLE_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "rectangle", 1);
+ public final static FunctionIdentifier POLYGON_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "polygon", 1);
+ public final static FunctionIdentifier TIME_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "time", 1);
+ public final static FunctionIdentifier DATE_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "date", 1);
+ public final static FunctionIdentifier DATETIME_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "datetime", 1);
+ public final static FunctionIdentifier DURATION_CONSTRUCTOR = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "duration", 1);
public final static FunctionIdentifier INTERVAL_CONSTRUCTOR_DATE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-from-date", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-from-date", 2);
public final static FunctionIdentifier INTERVAL_CONSTRUCTOR_TIME = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-from-time", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-from-time", 2);
public final static FunctionIdentifier INTERVAL_CONSTRUCTOR_DATETIME = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-from-datetime", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-from-datetime", 2);
public final static FunctionIdentifier INTERVAL_CONSTRUCTOR_START_FROM_DATE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-start-from-date", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-start-from-date", 2);
public final static FunctionIdentifier INTERVAL_CONSTRUCTOR_START_FROM_TIME = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-start-from-time", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-start-from-time", 2);
public final static FunctionIdentifier INTERVAL_CONSTRUCTOR_START_FROM_DATETIME = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-start-from-datetime", 2);
- public final static FunctionIdentifier INTERVAL_BEFORE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-before", 2);
- public final static FunctionIdentifier INTERVAL_AFTER = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-after", 2);
- public final static FunctionIdentifier INTERVAL_MEETS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-meets", 2);
- public final static FunctionIdentifier INTERVAL_MET_BY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-met-by", 2);
- public final static FunctionIdentifier INTERVAL_OVERLAPS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-overlaps", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-start-from-datetime", 2);
+ public final static FunctionIdentifier INTERVAL_BEFORE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-before", 2);
+ public final static FunctionIdentifier INTERVAL_AFTER = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-after", 2);
+ public final static FunctionIdentifier INTERVAL_MEETS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-meets", 2);
+ public final static FunctionIdentifier INTERVAL_MET_BY = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-met-by", 2);
+ public final static FunctionIdentifier INTERVAL_OVERLAPS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-overlaps", 2);
public final static FunctionIdentifier INTERVAL_OVERLAPPED_BY = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "interval-overlapped-by", 2);
- public final static FunctionIdentifier OVERLAP = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "overlap", 2);
- public final static FunctionIdentifier INTERVAL_STARTS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-starts", 2);
- public final static FunctionIdentifier INTERVAL_STARTED_BY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-started-by", 2);
- public final static FunctionIdentifier INTERVAL_COVERS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-covers", 2);
- public final static FunctionIdentifier INTERVAL_COVERED_BY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-covered-by", 2);
- public final static FunctionIdentifier INTERVAL_ENDS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-ends", 2);
- public final static FunctionIdentifier INTERVAL_ENDED_BY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-ended-by", 2);
- public final static FunctionIdentifier CURRENT_TIME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "current-time", 0);
- public final static FunctionIdentifier CURRENT_DATE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "current-date", 0);
- public final static FunctionIdentifier CURRENT_DATETIME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "current-datetime", 0);
- public final static FunctionIdentifier DURATION_EQUAL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "duration-equal", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-overlapped-by", 2);
+ public final static FunctionIdentifier OVERLAP = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
+ "overlap", 2);
+ public final static FunctionIdentifier INTERVAL_STARTS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-starts", 2);
+ public final static FunctionIdentifier INTERVAL_STARTED_BY = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-started-by", 2);
+ public final static FunctionIdentifier INTERVAL_COVERS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-covers", 2);
+ public final static FunctionIdentifier INTERVAL_COVERED_BY = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-covered-by", 2);
+ public final static FunctionIdentifier INTERVAL_ENDS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-ends", 2);
+ public final static FunctionIdentifier INTERVAL_ENDED_BY = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "interval-ended-by", 2);
+ public final static FunctionIdentifier CURRENT_TIME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "current-time", 0);
+ public final static FunctionIdentifier CURRENT_DATE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "current-date", 0);
+ public final static FunctionIdentifier CURRENT_DATETIME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "current-datetime", 0);
+ public final static FunctionIdentifier DURATION_EQUAL = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "duration-equal", 2);
public final static FunctionIdentifier YEAR_MONTH_DURATION_GREATER_THAN = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "year-month-duration-greater-than", 2);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "year-month-duration-greater-than", 2);
public final static FunctionIdentifier YEAR_MONTH_DURATION_LESS_THAN = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "year-month-duration-less-than", 2);
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "year-month-duration-less-than", 2);
public final static FunctionIdentifier DAY_TIME_DURATION_GREATER_THAN = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "day-time-duration-greater-than", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "day-time-duration-greater-than", 2);
public final static FunctionIdentifier DAY_TIME_DURATION_LESS_THAN = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "day-time-duration-less-than", 2);
- public final static FunctionIdentifier DURATION_FROM_MONTHS = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "duration-from-months", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "day-time-duration-less-than", 2);
+ public final static FunctionIdentifier DURATION_FROM_MONTHS = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "duration-from-months", 1);
public final static FunctionIdentifier MONTHS_OF_YEAR_MONTH_DURATION = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "months-of-year-month-duration", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "months-of-year-month-duration", 1);
public final static FunctionIdentifier DURATION_FROM_MILLISECONDS = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "duration-from-ms", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "duration-from-ms", 1);
public final static FunctionIdentifier MILLISECONDS_OF_DAY_TIME_DURATION = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "ms-of-day-time-duration", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "ms-of-day-time-duration", 1);
// spatial
- public final static FunctionIdentifier CREATE_POINT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "create-point", 2);
- public final static FunctionIdentifier CREATE_LINE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "create-line", 2);
- public final static FunctionIdentifier CREATE_POLYGON = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "create-polygon", FunctionIdentifier.VARARGS);
- public final static FunctionIdentifier CREATE_CIRCLE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "create-circle", 2);
- public final static FunctionIdentifier CREATE_RECTANGLE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "create-rectangle", 2);
- public final static FunctionIdentifier SPATIAL_INTERSECT = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "spatial-intersect", 2);
- public final static FunctionIdentifier SPATIAL_AREA = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "spatial-area", 1);
- public final static FunctionIdentifier SPATIAL_DISTANCE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "spatial-distance", 2);
- public final static FunctionIdentifier CREATE_MBR = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier CREATE_POINT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "create-point", 2);
+ public final static FunctionIdentifier CREATE_LINE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "create-line", 2);
+ public final static FunctionIdentifier CREATE_POLYGON = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "create-polygon", FunctionIdentifier.VARARGS);
+ public final static FunctionIdentifier CREATE_CIRCLE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "create-circle", 2);
+ public final static FunctionIdentifier CREATE_RECTANGLE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "create-rectangle", 2);
+ public final static FunctionIdentifier SPATIAL_INTERSECT = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "spatial-intersect", 2);
+ public final static FunctionIdentifier SPATIAL_AREA = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "spatial-area", 1);
+ public final static FunctionIdentifier SPATIAL_DISTANCE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "spatial-distance", 2);
+ public final static FunctionIdentifier CREATE_MBR = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
"create-mbr", 3);
- public final static FunctionIdentifier SPATIAL_CELL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "spatial-cell", 4);
- public final static FunctionIdentifier SWITCH_CASE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "switch-case", FunctionIdentifier.VARARGS);
- public final static FunctionIdentifier REG_EXP = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "reg-exp", 2);
+ public final static FunctionIdentifier SPATIAL_CELL = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "spatial-cell", 4);
+ public final static FunctionIdentifier SWITCH_CASE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "switch-case", FunctionIdentifier.VARARGS);
+ public final static FunctionIdentifier REG_EXP = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "reg-exp", 2);
- public final static FunctionIdentifier INJECT_FAILURE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "inject-failure", 2);
- public final static FunctionIdentifier CAST_RECORD = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "cast-record", 1);
- public final static FunctionIdentifier CAST_LIST = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
+ public final static FunctionIdentifier INJECT_FAILURE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "inject-failure", 2);
+ public final static FunctionIdentifier CAST_RECORD = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "cast-record", 1);
+ public final static FunctionIdentifier CAST_LIST = new FunctionIdentifier(FunctionNamespace.ASTERIX_PUBLIC.name(),
"cast-list", 1);
// Spatial and temporal type accessors
public static final FunctionIdentifier ACCESSOR_TEMPORAL_YEAR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "year", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "year", 1);
public static final FunctionIdentifier ACCESSOR_TEMPORAL_MONTH = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "month", 1);
- public static final FunctionIdentifier ACCESSOR_TEMPORAL_DAY = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "day", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "month", 1);
+ public static final FunctionIdentifier ACCESSOR_TEMPORAL_DAY = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "day", 1);
public static final FunctionIdentifier ACCESSOR_TEMPORAL_HOUR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "hour", 1);
- public static final FunctionIdentifier ACCESSOR_TEMPORAL_MIN = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "minute", 1);
- public static final FunctionIdentifier ACCESSOR_TEMPORAL_SEC = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "second", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "hour", 1);
+ public static final FunctionIdentifier ACCESSOR_TEMPORAL_MIN = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "minute", 1);
+ public static final FunctionIdentifier ACCESSOR_TEMPORAL_SEC = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "second", 1);
public static final FunctionIdentifier ACCESSOR_TEMPORAL_MILLISEC = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "millisecond", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "millisecond", 1);
public static final FunctionIdentifier ACCESSOR_TEMPORAL_INTERVAL_START = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-interval-start", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-interval-start", 1);
public static final FunctionIdentifier ACCESSOR_TEMPORAL_INTERVAL_END = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-interval-end", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-interval-end", 1);
// Temporal functions
public static final FunctionIdentifier DATE_FROM_UNIX_TIME_IN_DAYS = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "date-from-unix-time-in-days", 1);
- public static final FunctionIdentifier DATE_FROM_DATETIME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "date-from-datetime", 1);
- public final static FunctionIdentifier ADD_DATE_DURATION = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "add-date-duration", 2);
- public final static FunctionIdentifier SUBTRACT_DATE = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "subtract-date", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "date-from-unix-time-in-days", 1);
+ public static final FunctionIdentifier DATE_FROM_DATETIME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "date-from-datetime", 1);
+ public final static FunctionIdentifier ADD_DATE_DURATION = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "add-date-duration", 2);
+ public final static FunctionIdentifier SUBTRACT_DATE = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "subtract-date", 2);
public final static FunctionIdentifier TIME_FROM_UNIX_TIME_IN_MS = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "time-from-unix-time-in-ms", 1);
- public final static FunctionIdentifier TIME_FROM_DATETIME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "time-from-datetime", 1);
- public final static FunctionIdentifier SUBTRACT_TIME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "subtract-time", 2);
- public final static FunctionIdentifier ADD_TIME_DURATION = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "add-time-duration", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "time-from-unix-time-in-ms", 1);
+ public final static FunctionIdentifier TIME_FROM_DATETIME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "time-from-datetime", 1);
+ public final static FunctionIdentifier SUBTRACT_TIME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "subtract-time", 2);
+ public final static FunctionIdentifier ADD_TIME_DURATION = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "add-time-duration", 2);
public final static FunctionIdentifier DATETIME_FROM_UNIX_TIME_IN_MS = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "datetime-from-unix-time-in-ms", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "datetime-from-unix-time-in-ms", 1);
public final static FunctionIdentifier DATETIME_FROM_DATE_TIME = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "datetime-from-date-time", 2);
- public final static FunctionIdentifier SUBTRACT_DATETIME = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "subtract-datetime", 2);
- public final static FunctionIdentifier ADD_DATETIME_DURATION = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "add-datetime-duration", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "datetime-from-date-time", 2);
+ public final static FunctionIdentifier SUBTRACT_DATETIME = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "subtract-datetime", 2);
+ public final static FunctionIdentifier ADD_DATETIME_DURATION = new FunctionIdentifier(
+ FunctionNamespace.ASTERIX_PRIVATE.name(), "add-datetime-duration", 2);
public final static FunctionIdentifier CALENDAR_DURATION_FROM_DATETIME = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "calendar-duration-from-datetime", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "calendar-duration-from-datetime", 2);
public final static FunctionIdentifier CALENDAR_DURATION_FROM_DATE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "calendar-duration-from-date", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "calendar-duration-from-date", 2);
public final static FunctionIdentifier ADJUST_TIME_FOR_TIMEZONE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "adjust-time-for-timezone", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "adjust-time-for-timezone", 2);
public final static FunctionIdentifier ADJUST_DATETIME_FOR_TIMEZONE = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "adjust-datetime-for-timezone", 2);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "adjust-datetime-for-timezone", 2);
public final static FunctionIdentifier GET_POINT_X_COORDINATE_ACCESSOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-x", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-x", 1);
public final static FunctionIdentifier GET_POINT_Y_COORDINATE_ACCESSOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-y", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-y", 1);
public final static FunctionIdentifier GET_CIRCLE_RADIUS_ACCESSOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-radius", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-radius", 1);
public final static FunctionIdentifier GET_CIRCLE_CENTER_ACCESSOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-center", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-center", 1);
public final static FunctionIdentifier GET_POINTS_LINE_RECTANGLE_POLYGON_ACCESSOR = new FunctionIdentifier(
- FunctionConstants.ASTERIX_NS, "get-points", 1);
+ FunctionNamespace.ASTERIX_PUBLIC.name(), "get-points", 1);
public static final FunctionIdentifier EQ = AlgebricksBuiltinFunctions.EQ;
public static final FunctionIdentifier LE = AlgebricksBuiltinFunctions.LE;
@@ -543,8 +569,8 @@
public static final FunctionIdentifier NUMERIC_ADD = AlgebricksBuiltinFunctions.NUMERIC_ADD;
public static final FunctionIdentifier IS_NULL = AlgebricksBuiltinFunctions.IS_NULL;
- public static final FunctionIdentifier NOT_NULL = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "not-null",
- 1);
+ public static final FunctionIdentifier NOT_NULL = new FunctionIdentifier(FunctionNamespace.ASTERIX_PRIVATE.name(),
+ "not-null", 1);
public static IFunctionInfo getAsterixFunctionInfo(FunctionIdentifier fid) {
IFunctionInfo finfo = finfoRepo.get(fid);;
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarAvgAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarAvgAggregateDescriptor.java
index ae2a485..fa8f930 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarAvgAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarAvgAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.scalar;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -8,7 +8,7 @@
public class ScalarAvgAggregateDescriptor extends AbstractScalarAggregateDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "avg", 1);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.SCALAR_AVG;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new ScalarAvgAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarCountAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarCountAggregateDescriptor.java
index 6f3baa6..1f362c9 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarCountAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarCountAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.scalar;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -8,7 +8,7 @@
public class ScalarCountAggregateDescriptor extends AbstractScalarAggregateDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "count", 1);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.SCALAR_COUNT;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new ScalarCountAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMaxAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMaxAggregateDescriptor.java
index a71eb3c..26cb74e 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMaxAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMaxAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.scalar;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -8,7 +8,7 @@
public class ScalarMaxAggregateDescriptor extends AbstractScalarAggregateDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "max", 1);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.SCALAR_MAX;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new ScalarMaxAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMinAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMinAggregateDescriptor.java
index 4beae60..4d2bbd4 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMinAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarMinAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.scalar;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -8,7 +8,7 @@
public class ScalarMinAggregateDescriptor extends AbstractScalarAggregateDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "min", 1);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.SCALAR_MIN;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new ScalarMinAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarSumAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarSumAggregateDescriptor.java
index f3d9d1a..c82e3e2 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarSumAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/scalar/ScalarSumAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.scalar;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
@@ -8,7 +8,7 @@
public class ScalarSumAggregateDescriptor extends AbstractScalarAggregateDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "sum", 1);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.SCALAR_SUM;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new ScalarSumAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
index 6badf0f..c3ee985 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/serializable/std/SerializableLocalSumAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.serializable.std;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.runtime.aggregates.base.AbstractSerializableAggregateFunctionDynamicDescriptor;
@@ -13,8 +13,7 @@
public class SerializableLocalSumAggregateDescriptor extends AbstractSerializableAggregateFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- private final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "local-sum-serial", 1);
+ private final static FunctionIdentifier FID = AsterixBuiltinFunctions.SERIAL_LOCAL_SUM;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new SerializableLocalSumAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMaxAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMaxAggregateDescriptor.java
index 59287d5..e7346a8 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMaxAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMaxAggregateDescriptor.java
@@ -1,6 +1,6 @@
package edu.uci.ics.asterix.runtime.aggregates.std;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
@@ -14,8 +14,8 @@
public class LocalMaxAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- private final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-max",
- 1);
+ private final static FunctionIdentifier FID = AsterixBuiltinFunctions.LOCAL_MAX;
+
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new LocalMaxAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMinAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMinAggregateDescriptor.java
index ca32e2f..9e6747d 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMinAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalMinAggregateDescriptor.java
@@ -1,6 +1,7 @@
package edu.uci.ics.asterix.runtime.aggregates.std;
import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
@@ -14,8 +15,7 @@
public class LocalMinAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- private final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-min",
- 1);
+ private final static FunctionIdentifier FID = AsterixBuiltinFunctions.LOCAL_MIN;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new LocalMinAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalSumAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalSumAggregateDescriptor.java
index c133e09..01f6d28 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalSumAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/std/LocalSumAggregateDescriptor.java
@@ -1,6 +1,7 @@
package edu.uci.ics.asterix.runtime.aggregates.std;
import edu.uci.ics.asterix.common.functions.FunctionConstants;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.runtime.aggregates.base.AbstractAggregateFunctionDynamicDescriptor;
@@ -14,8 +15,7 @@
public class LocalSumAggregateDescriptor extends AbstractAggregateFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- private final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "agg-local-sum",
- 1);
+ private final static FunctionIdentifier FID = AsterixBuiltinFunctions.LOCAL_SUM;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new LocalSumAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
index 587a113..28d3c5e 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/aggregates/stream/EmptyStreamAggregateDescriptor.java
@@ -5,6 +5,7 @@
import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
import edu.uci.ics.asterix.om.base.ABoolean;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.BuiltinType;
@@ -23,8 +24,7 @@
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "empty-stream", 0);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.EMPTY_STREAM;
public static final IFunctionDescriptorFactory FACTORY = new IFunctionDescriptorFactory() {
public IFunctionDescriptor createFunctionDescriptor() {
return new EmptyStreamAggregateDescriptor();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
index 577a1fb..fe21cbb 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleCenterAccessor.java
@@ -25,6 +25,7 @@
import edu.uci.ics.asterix.om.base.AMutablePoint;
import edu.uci.ics.asterix.om.base.ANull;
import edu.uci.ics.asterix.om.base.APoint;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -43,7 +44,7 @@
private static final long serialVersionUID = 1L;
- private static final FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-center", 1);
+ private static final FunctionIdentifier FID = AsterixBuiltinFunctions.GET_CIRCLE_CENTER_ACCESSOR;
private static final byte SER_CICLE_TAG = ATypeTag.CIRCLE.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java
index ffaae9e..0669f4c 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/CircleRadiusAccessor.java
@@ -24,6 +24,7 @@
import edu.uci.ics.asterix.om.base.ADouble;
import edu.uci.ics.asterix.om.base.AMutableDouble;
import edu.uci.ics.asterix.om.base.ANull;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -42,7 +43,7 @@
private static final long serialVersionUID = 1L;
- private static final FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-radius", 1);
+ private static final FunctionIdentifier FID = AsterixBuiltinFunctions.GET_CIRCLE_RADIUS_ACCESSOR;
private static final byte SER_CICLE_TAG = ATypeTag.CIRCLE.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java
index d7f87df..8dbdf75 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/LineRectanglePolygonAccessor.java
@@ -29,6 +29,7 @@
import edu.uci.ics.asterix.om.base.AMutablePoint;
import edu.uci.ics.asterix.om.base.ANull;
import edu.uci.ics.asterix.om.base.APoint;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.AOrderedListType;
@@ -49,7 +50,7 @@
private static final long serialVersionUID = 1L;
- private static final FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-points", 1);
+ private static final FunctionIdentifier FID = AsterixBuiltinFunctions.GET_POINTS_LINE_RECTANGLE_POLYGON_ACCESSOR;
private static final byte SER_LINE_TAG = ATypeTag.LINE.serialize();
private static final byte SER_RECTANGLE_TAG = ATypeTag.RECTANGLE.serialize();
private static final byte SER_POLYGON_TAG = ATypeTag.POLYGON.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java
index 7fcfd20..c42a1b4 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointXCoordinateAccessor.java
@@ -25,6 +25,7 @@
import edu.uci.ics.asterix.om.base.ADouble;
import edu.uci.ics.asterix.om.base.AMutableDouble;
import edu.uci.ics.asterix.om.base.ANull;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -43,7 +44,7 @@
private static final long serialVersionUID = 1L;
- private static final FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-x", 1);
+ private static final FunctionIdentifier FID = AsterixBuiltinFunctions.GET_POINT_X_COORDINATE_ACCESSOR;
private static final byte SER_POINT_TAG = ATypeTag.POINT.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java
index 1c47efa..02c6b30 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/accessors/PointYCoordinateAccessor.java
@@ -25,6 +25,7 @@
import edu.uci.ics.asterix.om.base.ADouble;
import edu.uci.ics.asterix.om.base.AMutableDouble;
import edu.uci.ics.asterix.om.base.ANull;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -43,7 +44,7 @@
private static final long serialVersionUID = 1L;
- private static final FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS, "get-y", 1);
+ private static final FunctionIdentifier FID = AsterixBuiltinFunctions.GET_POINT_Y_COORDINATE_ACCESSOR;
private static final byte SER_POINT_TAG = ATypeTag.POINT.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java
index 8daf9a6..4c8c60f 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateConstructorDescriptor.java
@@ -17,7 +17,6 @@
import java.io.DataOutput;
import java.io.IOException;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADateSerializerDeserializer;
import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
import edu.uci.ics.asterix.om.base.AInterval;
@@ -25,6 +24,7 @@
import edu.uci.ics.asterix.om.base.ANull;
import edu.uci.ics.asterix.om.base.temporal.ADateParserFactory;
import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -43,8 +43,7 @@
public class AIntervalFromDateConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-from-date", 2);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.INTERVAL_CONSTRUCTOR_DATE;
private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
private final static byte SER_DATE_TYPE_TAG = ATypeTag.DATE.serialize();
@@ -123,7 +122,7 @@
+ ": expects NULL/STRING/DATE for the second argument, but got "
+ EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argOut1.getByteArray()[0]));
}
-
+
if (intervalEnd < intervalStart) {
throw new AlgebricksException(FID.getName()
+ ": interval end must not be less than the interval start.");
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java
index 78d2e4a..42479f4 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromDateTimeConstructorDescriptor.java
@@ -25,6 +25,7 @@
import edu.uci.ics.asterix.om.base.ANull;
import edu.uci.ics.asterix.om.base.temporal.ADateParserFactory;
import edu.uci.ics.asterix.om.base.temporal.ATimeParserFactory;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -43,8 +44,7 @@
public class AIntervalFromDateTimeConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-from-datetime", 2);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.INTERVAL_CONSTRUCTOR_DATETIME;
private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
private final static byte SER_DATETIME_TYPE_TAG = ATypeTag.DATETIME.serialize();
@@ -145,7 +145,7 @@
+ ": expects NULL/STRING/DATETIME for the second argument, but got "
+ EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(argOut1.getByteArray()[0]));
}
-
+
if (intervalEnd < intervalStart) {
throw new AlgebricksException(FID.getName()
+ ": interval end must not be less than the interval start.");
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java
index 8816160..eb69037 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalFromTimeConstructorDescriptor.java
@@ -25,6 +25,7 @@
import edu.uci.ics.asterix.om.base.ANull;
import edu.uci.ics.asterix.om.base.temporal.ATimeParserFactory;
import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -43,8 +44,7 @@
public class AIntervalFromTimeConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-from-time", 2);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.INTERVAL_CONSTRUCTOR_TIME;
private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
private final static byte SER_TIME_TYPE_TAG = ATypeTag.TIME.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
index 7ea8e90..c8a5d97 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateConstructorDescriptor.java
@@ -17,7 +17,6 @@
import java.io.DataOutput;
import java.io.IOException;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADateSerializerDeserializer;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
@@ -29,6 +28,7 @@
import edu.uci.ics.asterix.om.base.temporal.ADurationParserFactory;
import edu.uci.ics.asterix.om.base.temporal.DurationArithmeticOperations;
import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -47,8 +47,7 @@
public class AIntervalStartFromDateConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-start-from-date", 2);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.INTERVAL_CONSTRUCTOR_START_FROM_DATE;
private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
private final static byte SER_DATE_TYPE_TAG = ATypeTag.DATE.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
index f16dccb..0cdca36 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromDateTimeConstructorDescriptor.java
@@ -17,7 +17,6 @@
import java.io.DataOutput;
import java.io.IOException;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADateTimeSerializerDeserializer;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
@@ -29,6 +28,7 @@
import edu.uci.ics.asterix.om.base.temporal.ADurationParserFactory;
import edu.uci.ics.asterix.om.base.temporal.ATimeParserFactory;
import edu.uci.ics.asterix.om.base.temporal.DurationArithmeticOperations;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -47,8 +47,7 @@
public class AIntervalStartFromDateTimeConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-start-from-datetime", 2);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.INTERVAL_CONSTRUCTOR_START_FROM_DATETIME;
private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
private final static byte SER_DATETIME_TYPE_TAG = ATypeTag.DATETIME.serialize();
diff --git a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
index 35bfe17..a46a3bc 100644
--- a/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
+++ b/asterix-runtime/src/main/java/edu/uci/ics/asterix/runtime/evaluators/constructors/AIntervalStartFromTimeConstructorDescriptor.java
@@ -17,7 +17,6 @@
import java.io.DataOutput;
import java.io.IOException;
-import edu.uci.ics.asterix.common.functions.FunctionConstants;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ADurationSerializerDeserializer;
import edu.uci.ics.asterix.dataflow.data.nontagged.serde.ATimeSerializerDeserializer;
import edu.uci.ics.asterix.formats.nontagged.AqlSerializerDeserializerProvider;
@@ -29,6 +28,7 @@
import edu.uci.ics.asterix.om.base.temporal.ATimeParserFactory;
import edu.uci.ics.asterix.om.base.temporal.DurationArithmeticOperations;
import edu.uci.ics.asterix.om.base.temporal.GregorianCalendarSystem;
+import edu.uci.ics.asterix.om.functions.AsterixBuiltinFunctions;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptor;
import edu.uci.ics.asterix.om.functions.IFunctionDescriptorFactory;
import edu.uci.ics.asterix.om.types.ATypeTag;
@@ -47,8 +47,7 @@
public class AIntervalStartFromTimeConstructorDescriptor extends AbstractScalarFunctionDynamicDescriptor {
private static final long serialVersionUID = 1L;
- public final static FunctionIdentifier FID = new FunctionIdentifier(FunctionConstants.ASTERIX_NS,
- "interval-start-from-time", 2);
+ public final static FunctionIdentifier FID = AsterixBuiltinFunctions.INTERVAL_CONSTRUCTOR_START_FROM_TIME;
private final static byte SER_STRING_TYPE_TAG = ATypeTag.STRING.serialize();
private final static byte SER_NULL_TYPE_TAG = ATypeTag.NULL.serialize();
private final static byte SER_TIME_TYPE_TAG = ATypeTag.TIME.serialize();