You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@asterixdb.apache.org by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org> on 2016/08/18 07:00:11 UTC
Change in asterixdb[master]: remove unused class RecordConstructorResultType
Till Westmann has uploaded a new change for review.
https://asterix-gerrit.ics.uci.edu/1089
Change subject: remove unused class RecordConstructorResultType
......................................................................
remove unused class RecordConstructorResultType
Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
---
D asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
1 file changed, 0 insertions(+), 71 deletions(-)
git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/89/1089/1
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
deleted file mode 100644
index a5d6989..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
+++ /dev/null
@@ -1,71 +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.om.typecomputer.impl;
-
-import java.util.Iterator;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.ConstantExpressionUtil;
-import org.apache.commons.lang3.mutable.Mutable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class RecordConstructorResultType implements IResultTypeComputer {
-
- private boolean isOpen;
-
- public static final RecordConstructorResultType CLOSED_INSTANCE = new RecordConstructorResultType(false);
- public static final RecordConstructorResultType OPEN_INSTANCE = new RecordConstructorResultType(true);
-
- private RecordConstructorResultType(boolean open) {
- this.isOpen = open;
- }
-
- @Override
- public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
- IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
- AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
- IAType reqType = TypeCastUtils.getRequiredType(f);
- if (reqType != null)
- return reqType;
- int n = f.getArguments().size() / 2;
- String[] fieldNames = new String[n];
- IAType[] fieldTypes = new IAType[n];
- int i = 0;
- Iterator<Mutable<ILogicalExpression>> argIter = f.getArguments().iterator();
- while (argIter.hasNext()) {
- ILogicalExpression e1 = argIter.next().getValue();
- fieldNames[i] = ConstantExpressionUtil.getStringConstant(e1);
- if (fieldNames[i] == null) {
- throw new AlgebricksException("Expecting a string and found " + e1 + " instead.");
- }
- ILogicalExpression e2 = argIter.next().getValue();
- fieldTypes[i] = (IAType) env.getType(e2);
- i++;
- }
- return new ARecordType(null, fieldNames, fieldTypes, isOpen);
- }
-}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1089
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Change in asterixdb[master]: remove unused class RecordConstructorResultType
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: remove unused class RecordConstructorResultType
......................................................................
Patch Set 1: Integration-Tests+1
Integration Tests Successful
https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/362/ : SUCCESS
--
To view, visit https://asterix-gerrit.ics.uci.edu/1089
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in asterixdb[master]: remove unused class RecordConstructorResultType
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: remove unused class RecordConstructorResultType
......................................................................
Patch Set 1:
Integration Tests Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-integration-tests/362/
--
To view, visit https://asterix-gerrit.ics.uci.edu/1089
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No
Change in asterixdb[master]: remove unused class RecordConstructorResultType
Posted by "Jenkins (Code Review)" <do...@asterixdb.incubator.apache.org>.
Jenkins has posted comments on this change.
Change subject: remove unused class RecordConstructorResultType
......................................................................
Patch Set 1:
Build Started https://asterix-jenkins.ics.uci.edu/job/asterix-gerrit-notopic/2282/
--
To view, visit https://asterix-gerrit.ics.uci.edu/1089
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-HasComments: No
Change in asterixdb[master]: remove unused class RecordConstructorResultType
Posted by "Till Westmann (Code Review)" <do...@asterixdb.incubator.apache.org>.
Till Westmann has submitted this change and it was merged.
Change subject: remove unused class RecordConstructorResultType
......................................................................
remove unused class RecordConstructorResultType
Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1089
Reviewed-by: Yingyi Bu <bu...@gmail.com>
Sonar-Qube: Jenkins <je...@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <je...@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <je...@fulliautomatix.ics.uci.edu>
---
D asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
1 file changed, 0 insertions(+), 71 deletions(-)
Approvals:
Yingyi Bu: Looks good to me, approved
Jenkins: Verified; No violations found; Verified
diff --git a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java b/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
deleted file mode 100644
index a5d6989..0000000
--- a/asterixdb/asterix-om/src/main/java/org/apache/asterix/om/typecomputer/impl/RecordConstructorResultType.java
+++ /dev/null
@@ -1,71 +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.om.typecomputer.impl;
-
-import java.util.Iterator;
-
-import org.apache.asterix.om.typecomputer.base.IResultTypeComputer;
-import org.apache.asterix.om.typecomputer.base.TypeCastUtils;
-import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.IAType;
-import org.apache.asterix.om.util.ConstantExpressionUtil;
-import org.apache.commons.lang3.mutable.Mutable;
-import org.apache.hyracks.algebricks.common.exceptions.AlgebricksException;
-import org.apache.hyracks.algebricks.core.algebra.base.ILogicalExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
-import org.apache.hyracks.algebricks.core.algebra.expressions.IVariableTypeEnvironment;
-import org.apache.hyracks.algebricks.core.algebra.metadata.IMetadataProvider;
-
-public class RecordConstructorResultType implements IResultTypeComputer {
-
- private boolean isOpen;
-
- public static final RecordConstructorResultType CLOSED_INSTANCE = new RecordConstructorResultType(false);
- public static final RecordConstructorResultType OPEN_INSTANCE = new RecordConstructorResultType(true);
-
- private RecordConstructorResultType(boolean open) {
- this.isOpen = open;
- }
-
- @Override
- public IAType computeType(ILogicalExpression expression, IVariableTypeEnvironment env,
- IMetadataProvider<?, ?> metadataProvider) throws AlgebricksException {
- AbstractFunctionCallExpression f = (AbstractFunctionCallExpression) expression;
- IAType reqType = TypeCastUtils.getRequiredType(f);
- if (reqType != null)
- return reqType;
- int n = f.getArguments().size() / 2;
- String[] fieldNames = new String[n];
- IAType[] fieldTypes = new IAType[n];
- int i = 0;
- Iterator<Mutable<ILogicalExpression>> argIter = f.getArguments().iterator();
- while (argIter.hasNext()) {
- ILogicalExpression e1 = argIter.next().getValue();
- fieldNames[i] = ConstantExpressionUtil.getStringConstant(e1);
- if (fieldNames[i] == null) {
- throw new AlgebricksException("Expecting a string and found " + e1 + " instead.");
- }
- ILogicalExpression e2 = argIter.next().getValue();
- fieldTypes[i] = (IAType) env.getType(e2);
- i++;
- }
- return new ARecordType(null, fieldNames, fieldTypes, isOpen);
- }
-}
--
To view, visit https://asterix-gerrit.ics.uci.edu/1089
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Gerrit-PatchSet: 2
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Change in asterixdb[master]: remove unused class RecordConstructorResultType
Posted by "Yingyi Bu (Code Review)" <do...@asterixdb.incubator.apache.org>.
Yingyi Bu has posted comments on this change.
Change subject: remove unused class RecordConstructorResultType
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://asterix-gerrit.ics.uci.edu/1089
To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: If60aa0672b250b928f33bd27de508c5dad0c63c6
Gerrit-PatchSet: 1
Gerrit-Project: asterixdb
Gerrit-Branch: master
Gerrit-Owner: Till Westmann <ti...@apache.org>
Gerrit-Reviewer: Jenkins <je...@fulliautomatix.ics.uci.edu>
Gerrit-Reviewer: Yingyi Bu <bu...@gmail.com>
Gerrit-HasComments: No