asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: ASTERIXDB-1711: remove "Aql"
Date Wed, 18 Jan 2017 18:51:39 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 908ae63bb -> 7ff91d02c


ASTERIXDB-1711: remove "Aql"

- AQLAPIServlet -> FullAPIServlet
- AqlPrimitiveValueProviderFactory -> PrimitiveValueProviderFactory
- remove AqlLogicalPlanAndMetadataImpl
- remore AqlMetadataImplConfig

Change-Id: I8e371941ba509d10193649aaed48a74a08d2d1f5
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1447
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
BAD: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: abdullah alamoudi <bamousaa@gmail.com>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/7ff91d02
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/7ff91d02
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/7ff91d02

Branch: refs/heads/master
Commit: 7ff91d02c6a535682fe05891c09f2e84efbce8d4
Parents: 908ae63
Author: Till Westmann <tillw@apache.org>
Authored: Mon Jan 16 22:32:14 2017 -0800
Committer: Till Westmann <tillw@apache.org>
Committed: Wed Jan 18 10:51:12 2017 -0800

----------------------------------------------------------------------
 .../asterix/api/http/servlet/AQLAPIServlet.java | 53 ---------------
 .../api/http/servlet/FullAPIServlet.java        | 53 +++++++++++++++
 .../external/ExternalIndexingOperations.java    |  4 +-
 .../file/SecondaryRTreeOperationsHelper.java    |  4 +-
 .../bootstrap/CCApplicationEntryPoint.java      |  6 +-
 .../declared/AqlLogicalPlanAndMetadataImpl.java | 50 --------------
 .../declared/AqlMetadataImplConfig.java         | 32 ---------
 .../metadata/declared/MetadataProvider.java     |  6 +-
 .../AqlPrimitiveValueProviderFactory.java       | 70 --------------------
 .../PrimitiveValueProviderFactory.java          | 65 ++++++++++++++++++
 10 files changed, 128 insertions(+), 215 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/AQLAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/AQLAPIServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/AQLAPIServlet.java
deleted file mode 100644
index bbb9dde..0000000
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/AQLAPIServlet.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.api.http.servlet;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.asterix.compiler.provider.ILangCompilationProvider;
-import org.apache.asterix.lang.common.base.Statement;
-import org.apache.asterix.translator.IStatementExecutorFactory;
-
-public class AQLAPIServlet extends RESTAPIServlet {
-
-    private static final long serialVersionUID = 1L;
-    private static final String AQL_STMT_PARAM_NAME = "aql";
-    private static final byte ALLOWED_CATEGORIES = Statement.Category.QUERY | Statement.Category.UPDATE
-            | Statement.Category.DDL | Statement.Category.PROCEDURE;
-
-    public AQLAPIServlet(ILangCompilationProvider compilationProvider,
-            IStatementExecutorFactory statementExecutorFactory) {
-        super(compilationProvider, statementExecutorFactory);
-    }
-
-    @Override
-    protected String getQueryParameter(HttpServletRequest request) {
-        return request.getParameter(AQL_STMT_PARAM_NAME);
-    }
-
-    @Override
-    protected byte getAllowedCategories() {
-        return ALLOWED_CATEGORIES;
-    }
-
-    @Override
-    protected String getErrorMessage() {
-        throw new IllegalStateException();
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/FullAPIServlet.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/FullAPIServlet.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/FullAPIServlet.java
new file mode 100644
index 0000000..0f86ec6
--- /dev/null
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/api/http/servlet/FullAPIServlet.java
@@ -0,0 +1,53 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.api.http.servlet;
+
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.asterix.compiler.provider.ILangCompilationProvider;
+import org.apache.asterix.lang.common.base.Statement;
+import org.apache.asterix.translator.IStatementExecutorFactory;
+
+public class FullAPIServlet extends RESTAPIServlet {
+
+    private static final long serialVersionUID = 1L;
+    private static final String AQL_STMT_PARAM_NAME = "aql";
+    private static final byte ALLOWED_CATEGORIES = Statement.Category.QUERY | Statement.Category.UPDATE
+            | Statement.Category.DDL | Statement.Category.PROCEDURE;
+
+    public FullAPIServlet(ILangCompilationProvider compilationProvider,
+            IStatementExecutorFactory statementExecutorFactory) {
+        super(compilationProvider, statementExecutorFactory);
+    }
+
+    @Override
+    protected String getQueryParameter(HttpServletRequest request) {
+        return request.getParameter(AQL_STMT_PARAM_NAME);
+    }
+
+    @Override
+    protected byte getAllowedCategories() {
+        return ALLOWED_CATEGORIES;
+    }
+
+    @Override
+    protected String getErrorMessage() {
+        throw new IllegalStateException();
+    }
+}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
index 1a74e17..a2518ec 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/app/external/ExternalIndexingOperations.java
@@ -39,7 +39,7 @@ import org.apache.asterix.common.ioopcallbacks.LSMBTreeIOOperationCallbackFactor
 import org.apache.asterix.common.ioopcallbacks.LSMBTreeWithBuddyIOOperationCallbackFactory;
 import org.apache.asterix.common.ioopcallbacks.LSMRTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.transactions.IResourceFactory;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveValueProviderFactory;
+import org.apache.asterix.dataflow.data.nontagged.valueproviders.PrimitiveValueProviderFactory;
 import org.apache.asterix.external.api.IAdapterFactory;
 import org.apache.asterix.external.indexing.ExternalFile;
 import org.apache.asterix.external.indexing.FilesIndexDescription;
@@ -601,7 +601,7 @@ public class ExternalIndexingOperations {
             secondaryComparatorFactories[i] = BinaryComparatorFactoryProvider.INSTANCE
                     .getBinaryComparatorFactory(nestedKeyType, true);
             secondaryTypeTraits[i] = TypeTraitProvider.INSTANCE.getTypeTrait(nestedKeyType);
-            valueProviderFactories[i] = AqlPrimitiveValueProviderFactory.INSTANCE;
+            valueProviderFactories[i] = PrimitiveValueProviderFactory.INSTANCE;
         }
         // Add serializers and comparators for primary index fields.
         for (int i = 0; i < numPrimaryKeys; i++) {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
index d6352b7..c96ba4c 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/file/SecondaryRTreeOperationsHelper.java
@@ -31,7 +31,7 @@ import org.apache.asterix.common.dataflow.LSMIndexUtil;
 import org.apache.asterix.common.exceptions.AsterixException;
 import org.apache.asterix.common.ioopcallbacks.LSMRTreeIOOperationCallbackFactory;
 import org.apache.asterix.common.transactions.IResourceFactory;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveValueProviderFactory;
+import org.apache.asterix.dataflow.data.nontagged.valueproviders.PrimitiveValueProviderFactory;
 import org.apache.asterix.external.indexing.IndexingConstants;
 import org.apache.asterix.external.operators.ExternalDataScanOperatorDescriptor;
 import org.apache.asterix.formats.nontagged.BinaryComparatorFactoryProvider;
@@ -212,7 +212,7 @@ public class SecondaryRTreeOperationsHelper extends SecondaryIndexOperationsHelp
             secondaryComparatorFactories[i] =
                     BinaryComparatorFactoryProvider.INSTANCE.getBinaryComparatorFactory(nestedKeyType,
true);
             secondaryTypeTraits[i] = TypeTraitProvider.INSTANCE.getTypeTrait(nestedKeyType);
-            valueProviderFactories[i] = AqlPrimitiveValueProviderFactory.INSTANCE;
+            valueProviderFactories[i] = PrimitiveValueProviderFactory.INSTANCE;
 
         }
         // Add serializers and comparators for primary index fields.

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
index 25a5418..19c00db 100644
--- a/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
+++ b/asterixdb/asterix-app/src/main/java/org/apache/asterix/hyracks/bootstrap/CCApplicationEntryPoint.java
@@ -30,7 +30,7 @@ import javax.servlet.Servlet;
 
 import org.apache.asterix.active.ActiveLifecycleListener;
 import org.apache.asterix.api.http.servlet.APIServlet;
-import org.apache.asterix.api.http.servlet.AQLAPIServlet;
+import org.apache.asterix.api.http.servlet.FullAPIServlet;
 import org.apache.asterix.api.http.servlet.ClusterAPIServlet;
 import org.apache.asterix.api.http.servlet.ClusterCCDetailsAPIServlet;
 import org.apache.asterix.api.http.servlet.ClusterNodeDetailsAPIServlet;
@@ -261,7 +261,7 @@ public class CCApplicationEntryPoint implements ICCApplicationEntryPoint
{
     protected Servlet createServlet(Servlets key) {
         switch (key) {
             case AQL:
-                return new AQLAPIServlet(ccExtensionManager.getAqlCompilationProvider(),
+                return new FullAPIServlet(ccExtensionManager.getAqlCompilationProvider(),
                         ccExtensionManager.getQueryTranslatorFactory());
             case AQL_QUERY:
                 return new QueryAPIServlet(ccExtensionManager.getAqlCompilationProvider(),
@@ -273,7 +273,7 @@ public class CCApplicationEntryPoint implements ICCApplicationEntryPoint
{
                 return new DDLAPIServlet(ccExtensionManager.getAqlCompilationProvider(),
                         ccExtensionManager.getQueryTranslatorFactory());
             case SQLPP:
-                return new AQLAPIServlet(ccExtensionManager.getSqlppCompilationProvider(),
+                return new FullAPIServlet(ccExtensionManager.getSqlppCompilationProvider(),
                         ccExtensionManager.getQueryTranslatorFactory());
             case SQLPP_QUERY:
                 return new QueryAPIServlet(ccExtensionManager.getSqlppCompilationProvider(),

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlLogicalPlanAndMetadataImpl.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlLogicalPlanAndMetadataImpl.java
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlLogicalPlanAndMetadataImpl.java
deleted file mode 100644
index 39e2781..0000000
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlLogicalPlanAndMetadataImpl.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.asterix.metadata.declared;
-
-import org.apache.hyracks.algebricks.common.constraints.AlgebricksPartitionConstraint;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlan;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalPlanAndMetadata;
-
-public class AqlLogicalPlanAndMetadataImpl implements ILogicalPlanAndMetadata {
-
-    private ILogicalPlan plan;
-    private MetadataProvider metadataProvider;
-
-    public AqlLogicalPlanAndMetadataImpl(ILogicalPlan plan, MetadataProvider metadataProvider)
{
-        this.plan = plan;
-        this.metadataProvider = metadataProvider;
-    }
-
-    @Override
-    public ILogicalPlan getPlan() {
-        return plan;
-    }
-
-    @Override
-    public MetadataProvider getMetadataProvider() {
-        return metadataProvider;
-    }
-
-    @Override
-    public AlgebricksPartitionConstraint getClusterLocations() {
-        return metadataProvider.getClusterLocations();
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataImplConfig.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataImplConfig.java
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataImplConfig.java
deleted file mode 100644
index b17fc20..0000000
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/AqlMetadataImplConfig.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.asterix.metadata.declared;
-
-public class AqlMetadataImplConfig {
-    private final boolean useInstantLock;
-
-    public AqlMetadataImplConfig(boolean useInstantLock) {
-        this.useInstantLock = useInstantLock;
-    }
-
-    public boolean isInstantLock() {
-        return useInstantLock;
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
index 26706c6..bd991fc 100644
--- a/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
+++ b/asterixdb/asterix-metadata/src/main/java/org/apache/asterix/metadata/declared/MetadataProvider.java
@@ -47,7 +47,7 @@ import org.apache.asterix.common.library.ILibraryManager;
 import org.apache.asterix.common.transactions.IRecoveryManager.ResourceType;
 import org.apache.asterix.common.transactions.JobId;
 import org.apache.asterix.common.utils.StoragePathUtil;
-import org.apache.asterix.dataflow.data.nontagged.valueproviders.AqlPrimitiveValueProviderFactory;
+import org.apache.asterix.dataflow.data.nontagged.valueproviders.PrimitiveValueProviderFactory;
 import org.apache.asterix.external.adapter.factory.LookupAdapterFactory;
 import org.apache.asterix.external.api.IAdapterFactory;
 import org.apache.asterix.external.api.IDataSourceAdapter;
@@ -632,7 +632,7 @@ public class MetadataProvider implements IMetadataProvider<DataSourceId,
String>
             IPrimitiveValueProviderFactory[] valueProviderFactories =
                     new IPrimitiveValueProviderFactory[numNestedSecondaryKeyFields];
             for (int i = 0; i < numNestedSecondaryKeyFields; i++) {
-                valueProviderFactories[i] = AqlPrimitiveValueProviderFactory.INSTANCE;
+                valueProviderFactories[i] = PrimitiveValueProviderFactory.INSTANCE;
             }
 
             RecordDescriptor outputRecDesc = JobGenHelper.mkRecordDescriptor(typeEnv, opSchema,
context);
@@ -1729,7 +1729,7 @@ public class MetadataProvider implements IMetadataProvider<DataSourceId,
String>
                 comparatorFactories[i] = BinaryComparatorFactoryProvider.INSTANCE
                         .getBinaryComparatorFactory(nestedKeyType, true);
                 typeTraits[i] = TypeTraitProvider.INSTANCE.getTypeTrait(nestedKeyType);
-                valueProviderFactories[i] = AqlPrimitiveValueProviderFactory.INSTANCE;
+                valueProviderFactories[i] = PrimitiveValueProviderFactory.INSTANCE;
             }
             List<List<String>> partitioningKeys = DatasetUtils.getPartitioningKeys(dataset);
             for (List<String> partitioningKey : partitioningKeys) {

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveValueProviderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveValueProviderFactory.java
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveValueProviderFactory.java
deleted file mode 100644
index 6944708..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/AqlPrimitiveValueProviderFactory.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *   http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.asterix.dataflow.data.nontagged.valueproviders;
-
-import org.apache.asterix.om.types.ATypeTag;
-import org.apache.asterix.om.types.EnumDeserializer;
-import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
-import org.apache.hyracks.storage.am.common.api.IPrimitiveValueProvider;
-import org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory;
-import org.apache.hyracks.storage.am.rtree.impls.DoublePrimitiveValueProviderFactory;
-import org.apache.hyracks.storage.am.rtree.impls.FloatPrimitiveValueProviderFactory;
-import org.apache.hyracks.storage.am.rtree.impls.IntegerPrimitiveValueProviderFactory;
-
-public class AqlPrimitiveValueProviderFactory implements IPrimitiveValueProviderFactory {
-
-    private static final long serialVersionUID = 1L;
-
-    public static final AqlPrimitiveValueProviderFactory INSTANCE = new AqlPrimitiveValueProviderFactory();
-
-    private AqlPrimitiveValueProviderFactory() {
-    }
-
-    @Override
-    public IPrimitiveValueProvider createPrimitiveValueProvider() {
-        return new IPrimitiveValueProvider() {
-            final IPrimitiveValueProvider intProvider = IntegerPrimitiveValueProviderFactory.INSTANCE
-                    .createPrimitiveValueProvider();
-            final IPrimitiveValueProvider floatProvider = FloatPrimitiveValueProviderFactory.INSTANCE
-                    .createPrimitiveValueProvider();
-            final IPrimitiveValueProvider doubleProvider = DoublePrimitiveValueProviderFactory.INSTANCE
-                    .createPrimitiveValueProvider();
-
-            @Override
-            public double getValue(byte[] bytes, int offset) {
-
-                ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
-                switch (tag) {
-                    case INT32: {
-                        return intProvider.getValue(bytes, offset + 1);
-                    }
-                    case FLOAT: {
-                        return floatProvider.getValue(bytes, offset + 1);
-                    }
-                    case DOUBLE: {
-                        return doubleProvider.getValue(bytes, offset + 1);
-                    }
-                    default: {
-                        throw new NotImplementedException("Value provider for type " + tag
+ " is not implemented");
-                    }
-                }
-            }
-        };
-    }
-}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/7ff91d02/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/PrimitiveValueProviderFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/PrimitiveValueProviderFactory.java
b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/PrimitiveValueProviderFactory.java
new file mode 100644
index 0000000..62f3312
--- /dev/null
+++ b/asterixdb/asterix-om/src/main/java/org/apache/asterix/dataflow/data/nontagged/valueproviders/PrimitiveValueProviderFactory.java
@@ -0,0 +1,65 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.asterix.dataflow.data.nontagged.valueproviders;
+
+import org.apache.asterix.om.types.ATypeTag;
+import org.apache.asterix.om.types.EnumDeserializer;
+import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
+import org.apache.hyracks.storage.am.common.api.IPrimitiveValueProvider;
+import org.apache.hyracks.storage.am.common.api.IPrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.DoublePrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.FloatPrimitiveValueProviderFactory;
+import org.apache.hyracks.storage.am.rtree.impls.IntegerPrimitiveValueProviderFactory;
+
+public class PrimitiveValueProviderFactory implements IPrimitiveValueProviderFactory {
+
+    private static final long serialVersionUID = 1L;
+
+    public static final PrimitiveValueProviderFactory INSTANCE = new PrimitiveValueProviderFactory();
+
+    private PrimitiveValueProviderFactory() {
+    }
+
+    @Override
+    public IPrimitiveValueProvider createPrimitiveValueProvider() {
+        return new IPrimitiveValueProvider() {
+            final IPrimitiveValueProvider intProvider = IntegerPrimitiveValueProviderFactory.INSTANCE
+                    .createPrimitiveValueProvider();
+            final IPrimitiveValueProvider floatProvider = FloatPrimitiveValueProviderFactory.INSTANCE
+                    .createPrimitiveValueProvider();
+            final IPrimitiveValueProvider doubleProvider = DoublePrimitiveValueProviderFactory.INSTANCE
+                    .createPrimitiveValueProvider();
+
+            @Override
+            public double getValue(byte[] bytes, int offset) {
+                ATypeTag tag = EnumDeserializer.ATYPETAGDESERIALIZER.deserialize(bytes[offset]);
+                switch (tag) {
+                    case INT32:
+                        return intProvider.getValue(bytes, offset + 1);
+                    case FLOAT:
+                        return floatProvider.getValue(bytes, offset + 1);
+                    case DOUBLE:
+                        return doubleProvider.getValue(bytes, offset + 1);
+                    default:
+                        throw new NotImplementedException("Value provider for type " + tag
+ " is not implemented");
+                }
+            }
+        };
+    }
+}


Mime
View raw message