[FLINK-441] [optimizer] Remove obsolete and unused utility classes

Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/9d222ca1
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/9d222ca1
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/9d222ca1

Branch: refs/heads/master
Commit: 9d222ca1bb77b48e0988d5d1a9c3cb7f8fc622be
Parents: c91fb7c
Author: Stephan Ewen <se...@apache.org>
Authored: Tue Mar 17 11:02:33 2015 +0100
Committer: Stephan Ewen <se...@apache.org>
Committed: Fri Mar 20 10:21:14 2015 +0100

----------------------------------------------------------------------
 .../optimizer/NonCachingDataStatistics.java     |  35 -----
 .../optimizer/postpass/DenseValueSchema.java    | 156 -------------------
 .../postpass/MissingFieldTypeInfoException.java |   1 -
 .../optimizer/postpass/SparseKeySchema.java     |   1 -
 4 files changed, 193 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/9d222ca1/flink-compiler/src/main/java/org/apache/flink/optimizer/NonCachingDataStatistics.java
----------------------------------------------------------------------
diff --git 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/NonCachingDataStatistics.java
 
b/flink-compiler/src/main/java/org/apache/flink/optimizer/NonCachingDataStatistics.java
deleted file mode 100644
index 3e1a1dd..0000000
--- 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/NonCachingDataStatistics.java
+++ /dev/null
@@ -1,35 +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.flink.optimizer;
-
-import org.apache.flink.api.common.io.statistics.BaseStatistics;
-
-/**
- * A variant of the data statistics that never caches.
- */
-public class NonCachingDataStatistics extends DataStatistics {
-       
-       public BaseStatistics getBaseStatistics(String inputIdentifier) {
-               return null;
-       }
-       
-       public void cacheBaseStatistics(BaseStatistics statistics, String 
identifyer) {
-       }
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/9d222ca1/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/DenseValueSchema.java
----------------------------------------------------------------------
diff --git 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/DenseValueSchema.java
 
b/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/DenseValueSchema.java
deleted file mode 100644
index ecce33d..0000000
--- 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/DenseValueSchema.java
+++ /dev/null
@@ -1,156 +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.flink.optimizer.postpass;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.flink.types.Value;
-
-/**
- * Class encapsulating a schema map (int column position -> column type) and a 
reference counter.
- */
-public class DenseValueSchema extends AbstractSchema<Class<? extends Value>> {
-       
-       private final List<Class<? extends Value>> schema;
-       
-       private int numFields = -1;
-       
-       
-       public DenseValueSchema() {
-               this.schema = new ArrayList<Class<? extends Value>>();
-       }
-
-       // 
--------------------------------------------------------------------------------------------
-       
-       @Override
-       public void addType(int pos, Class<? extends Value> type) throws 
ConflictingFieldTypeInfoException {
-               if (pos == schema.size()) {
-                       // right at the end, most common case
-                       schema.add(type);
-               } else if (pos < schema.size()) {
-                       // in the middle, check for existing conflicts
-                       Class<? extends Value> previous = schema.get(pos);
-                       if (previous == null) {
-                               schema.set(pos, type);
-                       } else if (previous != type) {
-                               throw new 
ConflictingFieldTypeInfoException(pos, previous, type);
-                       }
-               } else {
-                       // grow to the end
-                       for (int i = schema.size(); i <= pos; i++) {
-                               schema.add(null);
-                       }
-                       schema.set(pos, type);
-               }
-       }
-       
-       @Override
-       public Class<? extends Value> getType(int field) {
-               return schema.get(field);
-       }
-       
-       @Override
-       public Iterator<Map.Entry<Integer, Class<? extends Value>>> iterator() {
-               final Iterator<Class<? extends Value>> iter = schema.iterator();
-               return new Iterator<Map.Entry<Integer,Class<? extends 
Value>>>() {
-
-                       private int pos = 0;
-                       
-                       @Override
-                       public boolean hasNext() {
-                               return iter.hasNext();
-                       }
-
-                       @Override
-                       public java.util.Map.Entry<Integer, Class<? extends 
Value>> next() {
-                               return new Entry(pos++, iter.next());
-                       }
-
-                       @Override
-                       public void remove() {
-                               throw new UnsupportedOperationException();
-                       }
-               };
-       }
-       
-       public int getNumFields() {
-               return numFields;
-       }
-
-       
-       public void setNumFields(int numFields) {
-               this.numFields = numFields;
-       }
-       
-       // 
--------------------------------------------------------------------------------------------
-
-       @Override
-       public int hashCode() {
-               return schema.hashCode() ^ getNumConnectionsThatContributed();
-       }
-
-       @Override
-       public boolean equals(Object obj) {
-               if (obj instanceof DenseValueSchema) {
-                       DenseValueSchema other = (DenseValueSchema) obj;
-                       return schema.equals(other.schema) && 
-                                       getNumConnectionsThatContributed() == 
other.getNumConnectionsThatContributed();
-               } else {
-                       return false;
-               }
-       }
-       
-       @Override
-       public String toString() {
-               return "<" + getNumConnectionsThatContributed() + "> : " + 
schema.toString();
-       }
-       
-       // 
--------------------------------------------------------------------------------------------
-       
-       private static final class Entry implements Map.Entry<Integer, Class<? 
extends Value>> {
-               
-               private Integer key;
-               private Class<? extends Value> value;
-               
-               
-               public Entry(Integer key, Class<? extends Value> value) {
-                       this.key = key;
-                       this.value = value;
-               }
-
-               @Override
-               public Integer getKey() {
-                       return this.key;
-               }
-
-               @Override
-               public Class<? extends Value> getValue() {
-                       return this.value;
-               }
-
-               @Override
-               public Class<? extends Value> setValue(Class<? extends Value> 
value) {
-                       throw new UnsupportedOperationException();
-               }
-       }
-}

http://git-wip-us.apache.org/repos/asf/flink/blob/9d222ca1/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/MissingFieldTypeInfoException.java
----------------------------------------------------------------------
diff --git 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/MissingFieldTypeInfoException.java
 
b/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/MissingFieldTypeInfoException.java
index 3ba3446..b9f6bfa 100644
--- 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/MissingFieldTypeInfoException.java
+++ 
b/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/MissingFieldTypeInfoException.java
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.flink.optimizer.postpass;
 
 public final class MissingFieldTypeInfoException extends Exception {

http://git-wip-us.apache.org/repos/asf/flink/blob/9d222ca1/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/SparseKeySchema.java
----------------------------------------------------------------------
diff --git 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/SparseKeySchema.java
 
b/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/SparseKeySchema.java
index c4b95d1..e14888e 100644
--- 
a/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/SparseKeySchema.java
+++ 
b/flink-compiler/src/main/java/org/apache/flink/optimizer/postpass/SparseKeySchema.java
@@ -16,7 +16,6 @@
  * limitations under the License.
  */
 
-
 package org.apache.flink.optimizer.postpass;
 
 import java.util.HashMap;

Reply via email to