parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b...@apache.org
Subject [31/51] [partial] parquet-mr git commit: PARQUET-23: Rename to org.apache.parquet.
Date Mon, 27 Apr 2015 23:12:28 GMT
http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/FloatValue.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/FloatValue.java b/parquet-column/src/main/java/parquet/example/data/simple/FloatValue.java
deleted file mode 100644
index 842b8fa..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/FloatValue.java
+++ /dev/null
@@ -1,45 +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 parquet.example.data.simple;
-
-import parquet.io.api.RecordConsumer;
-
-public class FloatValue extends Primitive {
-
-  private final float value;
-
-  public FloatValue(float value) {
-    this.value = value;
-  }
-
-  @Override
-  public float getFloat() {
-    return value;
-  }
-
-  @Override
-  public void writeValue(RecordConsumer recordConsumer) {
-    recordConsumer.addFloat(value);
-  }
-
-  @Override
-  public String toString() {
-    return String.valueOf(value);
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/Int96Value.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/Int96Value.java b/parquet-column/src/main/java/parquet/example/data/simple/Int96Value.java
deleted file mode 100644
index f5374df..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/Int96Value.java
+++ /dev/null
@@ -1,46 +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 parquet.example.data.simple;
-
-import parquet.io.api.Binary;
-import parquet.io.api.RecordConsumer;
-
-public class Int96Value extends Primitive {
-
-  private final Binary value;
-
-  public Int96Value(Binary value) {
-    this.value = value;
-  }
-
-  @Override
-  public Binary getInt96() {
-    return value;
-  }
-
-  @Override
-  public void writeValue(RecordConsumer recordConsumer) {
-    recordConsumer.addBinary(value);
-  }
-
-  @Override
-  public String toString() {
-    return "Int96Value{" + String.valueOf(value) + "}";
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/IntegerValue.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/IntegerValue.java b/parquet-column/src/main/java/parquet/example/data/simple/IntegerValue.java
deleted file mode 100644
index b147f56..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/IntegerValue.java
+++ /dev/null
@@ -1,46 +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 parquet.example.data.simple;
-
-import parquet.io.api.RecordConsumer;
-
-
-public class IntegerValue extends Primitive {
-
-  private final int value;
-
-  public IntegerValue(int value) {
-    this.value = value;
-  }
-
-  @Override
-  public String toString() {
-    return String.valueOf(value);
-  }
-
-  @Override
-  public int getInteger() {
-    return value;
-  }
-
-  @Override
-  public void writeValue(RecordConsumer recordConsumer) {
-    recordConsumer.addInteger(value);
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/LongValue.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/LongValue.java b/parquet-column/src/main/java/parquet/example/data/simple/LongValue.java
deleted file mode 100644
index c883a45..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/LongValue.java
+++ /dev/null
@@ -1,45 +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 parquet.example.data.simple;
-
-import parquet.io.api.RecordConsumer;
-
-public class LongValue extends Primitive {
-
-  private final long value;
-
-  public LongValue(long value) {
-    this.value = value;
-  }
-
-  @Override
-  public String toString() {
-    return String.valueOf(value);
-  }
-
-  @Override
-  public long getLong() {
-    return value;
-  }
-
-  @Override
-  public void writeValue(RecordConsumer recordConsumer) {
-    recordConsumer.addLong(value);
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/NanoTime.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/NanoTime.java b/parquet-column/src/main/java/parquet/example/data/simple/NanoTime.java
deleted file mode 100644
index b5a271f..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/NanoTime.java
+++ /dev/null
@@ -1,80 +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 parquet.example.data.simple;
-
-import java.nio.ByteBuffer;
-import java.nio.ByteOrder;
-import parquet.Preconditions;
-import parquet.io.api.Binary;
-import parquet.io.api.RecordConsumer;
-
-public class NanoTime extends Primitive {
-  private final int julianDay;
-  private final long timeOfDayNanos;
-
-  public static NanoTime fromBinary(Binary bytes) {
-    Preconditions.checkArgument(bytes.length() == 12, "Must be 12 bytes");
-    ByteBuffer buf = bytes.toByteBuffer();
-    buf.order(ByteOrder.LITTLE_ENDIAN);
-    long timeOfDayNanos = buf.getLong();
-    int julianDay = buf.getInt();
-    return new NanoTime(julianDay, timeOfDayNanos);
-  }
-
-  public static NanoTime fromInt96(Int96Value int96) {
-    ByteBuffer buf = int96.getInt96().toByteBuffer();
-    return new NanoTime(buf.getInt(), buf.getLong());
-  }
-
-  public NanoTime(int julianDay, long timeOfDayNanos) {
-    this.julianDay = julianDay;
-    this.timeOfDayNanos = timeOfDayNanos;
-  }
-
-  public int getJulianDay() {
-    return julianDay;
-  }
-
-  public long getTimeOfDayNanos() {
-    return timeOfDayNanos;
-  }
-
-  public Binary toBinary() {
-    ByteBuffer buf = ByteBuffer.allocate(12);
-    buf.order(ByteOrder.LITTLE_ENDIAN);
-    buf.putLong(timeOfDayNanos);
-    buf.putInt(julianDay);
-    buf.flip();
-    return Binary.fromByteBuffer(buf);
-  }
-
-  public Int96Value toInt96() {
-    return new Int96Value(toBinary());
-  }
-
-  @Override
-  public void writeValue(RecordConsumer recordConsumer) {
-    recordConsumer.addBinary(toBinary());
-  }
-
-  @Override
-  public String toString() {
-    return "NanoTime{julianDay="+julianDay+", timeOfDayNanos="+timeOfDayNanos+"}";
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/Primitive.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/Primitive.java b/parquet-column/src/main/java/parquet/example/data/simple/Primitive.java
deleted file mode 100644
index ea5c86f..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/Primitive.java
+++ /dev/null
@@ -1,60 +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 parquet.example.data.simple;
-
-import parquet.io.api.Binary;
-import parquet.io.api.RecordConsumer;
-
-public abstract class Primitive {
-
-  public String getString() {
-    throw new UnsupportedOperationException();
-  }
-
-  public int getInteger() {
-    throw new UnsupportedOperationException();
-  }
-
-  public long getLong() {
-    throw new UnsupportedOperationException();
-  }
-
-  public boolean getBoolean() {
-    throw new UnsupportedOperationException();
-  }
-
-  public Binary getBinary() {
-    throw new UnsupportedOperationException();
-  }
-
-  public Binary getInt96() {
-    throw new UnsupportedOperationException();
-  }
-
-  public float getFloat() {
-    throw new UnsupportedOperationException();
-  }
-
-  public double getDouble() {
-    throw new UnsupportedOperationException();
-  }
-
-  abstract public void writeValue(RecordConsumer recordConsumer);
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroup.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroup.java b/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroup.java
deleted file mode 100644
index 136c068..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroup.java
+++ /dev/null
@@ -1,232 +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 parquet.example.data.simple;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import parquet.example.data.Group;
-import parquet.io.api.Binary;
-import parquet.io.api.RecordConsumer;
-import parquet.schema.GroupType;
-import parquet.schema.Type;
-
-
-public class SimpleGroup extends Group {
-
-  private final GroupType schema;
-  private final List<Object>[] data;
-
-  @SuppressWarnings("unchecked")
-  public SimpleGroup(GroupType schema) {
-    this.schema = schema;
-    this.data = new List[schema.getFields().size()];
-    for (int i = 0; i < schema.getFieldCount(); i++) {
-       this.data[i] = new ArrayList<Object>();
-    }
-  }
-
-  @Override
-  public String toString() {
-    return toString("");
-  }
-
-  public String toString(String indent) {
-    String result = "";
-    int i = 0;
-    for (Type field : schema.getFields()) {
-      String name = field.getName();
-      List<Object> values = data[i];
-      ++i;
-      if (values != null) {
-        if (values.size() > 0) {
-          for (Object value : values) {
-            result += indent + name;
-            if (value == null) {
-              result += ": NULL\n";
-            } else if (value instanceof Group) {
-              result += "\n" + ((SimpleGroup)value).toString(indent+"  ");
-            } else {
-              result += ": " + value.toString() + "\n";
-            }
-          }
-        }
-      }
-    }
-    return result;
-  }
-
-  @Override
-  public Group addGroup(int fieldIndex) {
-    SimpleGroup g = new SimpleGroup(schema.getType(fieldIndex).asGroupType());
-    add(fieldIndex, g);
-    return g;
-  }
-
-  @Override
-  public Group getGroup(int fieldIndex, int index) {
-    return (Group)getValue(fieldIndex, index);
-  }
-
-  private Object getValue(int fieldIndex, int index) {
-    List<Object> list;
-    try {
-      list = data[fieldIndex];
-    } catch (IndexOutOfBoundsException e) {
-      throw new RuntimeException("not found " + fieldIndex + "(" + schema.getFieldName(fieldIndex) + ") in group:\n" + this);
-    }
-    try {
-      return list.get(index);
-    } catch (IndexOutOfBoundsException e) {
-      throw new RuntimeException("not found " + fieldIndex + "(" + schema.getFieldName(fieldIndex) + ") element number " + index + " in group:\n" + this);
-    }
-  }
-
-  private void add(int fieldIndex, Primitive value) {
-    Type type = schema.getType(fieldIndex);
-    List<Object> list = data[fieldIndex];
-    if (!type.isRepetition(Type.Repetition.REPEATED)
-        && !list.isEmpty()) {
-      throw new IllegalStateException("field "+fieldIndex+" (" + type.getName() + ") can not have more than one value: " + list);
-    }
-    list.add(value);
-  }
-
-  @Override
-  public int getFieldRepetitionCount(int fieldIndex) {
-    List<Object> list = data[fieldIndex];
-    return list == null ? 0 : list.size();
-  }
-
-  @Override
-  public String getValueToString(int fieldIndex, int index) {
-    return String.valueOf(getValue(fieldIndex, index));
-  }
-
-  @Override
-  public String getString(int fieldIndex, int index) {
-    return ((BinaryValue)getValue(fieldIndex, index)).getString();
-  }
-
-  @Override
-  public int getInteger(int fieldIndex, int index) {
-    return ((IntegerValue)getValue(fieldIndex, index)).getInteger();
-  }
-
-  @Override
-  public long getLong(int fieldIndex, int index) {
-    return ((LongValue)getValue(fieldIndex, index)).getLong();
-  }
-
-  @Override
-  public double getDouble(int fieldIndex, int index) {
-    return ((DoubleValue)getValue(fieldIndex, index)).getDouble();
-  }
-
-  @Override
-  public float getFloat(int fieldIndex, int index) {
-    return ((FloatValue)getValue(fieldIndex, index)).getFloat();
-  }
-
-  @Override
-  public boolean getBoolean(int fieldIndex, int index) {
-    return ((BooleanValue)getValue(fieldIndex, index)).getBoolean();
-  }
-
-  @Override
-  public Binary getBinary(int fieldIndex, int index) {
-    return ((BinaryValue)getValue(fieldIndex, index)).getBinary();
-  }
-
-  public NanoTime getTimeNanos(int fieldIndex, int index) {
-    return NanoTime.fromInt96((Int96Value)getValue(fieldIndex, index));
-  }
-
-  @Override
-  public Binary getInt96(int fieldIndex, int index) {
-    return ((Int96Value)getValue(fieldIndex, index)).getInt96();
-  }
-
-  @Override
-  public void add(int fieldIndex, int value) {
-    add(fieldIndex, new IntegerValue(value));
-  }
-
-  @Override
-  public void add(int fieldIndex, long value) {
-    add(fieldIndex, new LongValue(value));
-  }
-
-  @Override
-  public void add(int fieldIndex, String value) {
-    add(fieldIndex, new BinaryValue(Binary.fromString(value)));
-  }
-
-  @Override
-  public void add(int fieldIndex, NanoTime value) {
-    add(fieldIndex, value.toInt96());
-  }
-
-  @Override
-  public void add(int fieldIndex, boolean value) {
-    add(fieldIndex, new BooleanValue(value));
-  }
-
-  @Override
-  public void add(int fieldIndex, Binary value) {
-    switch (getType().getType(fieldIndex).asPrimitiveType().getPrimitiveTypeName()) {
-      case BINARY:
-      case FIXED_LEN_BYTE_ARRAY:
-        add(fieldIndex, new BinaryValue(value));
-        break;
-      case INT96:
-        add(fieldIndex, new Int96Value(value));
-        break;
-      default:
-        throw new UnsupportedOperationException(
-            getType().asPrimitiveType().getName() + " not supported for Binary");
-    }
-  }
-
-  @Override
-  public void add(int fieldIndex, float value) {
-    add(fieldIndex, new FloatValue(value));
-  }
-
-  @Override
-  public void add(int fieldIndex, double value) {
-    add(fieldIndex, new DoubleValue(value));
-  }
-
-  @Override
-  public void add(int fieldIndex, Group value) {
-    data[fieldIndex].add(value);
-  }
-
-  @Override
-  public GroupType getType() {
-    return schema;
-  }
-
-  @Override
-  public void writeValue(int field, int index, RecordConsumer recordConsumer) {
-    ((Primitive)getValue(field, index)).writeValue(recordConsumer);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroupFactory.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroupFactory.java b/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroupFactory.java
deleted file mode 100644
index f13690a..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/SimpleGroupFactory.java
+++ /dev/null
@@ -1,38 +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 parquet.example.data.simple;
-
-import parquet.example.data.Group;
-import parquet.example.data.GroupFactory;
-import parquet.schema.MessageType;
-
-public class SimpleGroupFactory extends GroupFactory {
-
-  private final MessageType schema;
-
-  public SimpleGroupFactory(MessageType schema) {
-    this.schema = schema;
-  }
-
-  @Override
-  public Group newGroup() {
-    return new SimpleGroup(schema);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/convert/GroupRecordConverter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/convert/GroupRecordConverter.java b/parquet-column/src/main/java/parquet/example/data/simple/convert/GroupRecordConverter.java
deleted file mode 100644
index e9f0236..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/convert/GroupRecordConverter.java
+++ /dev/null
@@ -1,57 +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 parquet.example.data.simple.convert;
-
-import parquet.example.data.Group;
-import parquet.example.data.simple.SimpleGroupFactory;
-import parquet.io.api.GroupConverter;
-import parquet.io.api.RecordMaterializer;
-import parquet.schema.MessageType;
-
-public class GroupRecordConverter extends RecordMaterializer<Group> {
-
-  private final SimpleGroupFactory simpleGroupFactory;
-
-  private SimpleGroupConverter root;
-
-  public GroupRecordConverter(MessageType schema) {
-    this.simpleGroupFactory = new SimpleGroupFactory(schema);
-    this.root = new SimpleGroupConverter(null, 0, schema) {
-      @Override
-      public void start() {
-        this.current = simpleGroupFactory.newGroup();
-      }
-
-      @Override
-      public void end() {
-      }
-    };
-  }
-
-  @Override
-  public Group getCurrentRecord() {
-    return root.getCurrentRecord();
-  }
-
-  @Override
-  public GroupConverter getRootConverter() {
-    return root;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/convert/SimpleGroupConverter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/convert/SimpleGroupConverter.java b/parquet-column/src/main/java/parquet/example/data/simple/convert/SimpleGroupConverter.java
deleted file mode 100644
index bb4144e..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/convert/SimpleGroupConverter.java
+++ /dev/null
@@ -1,67 +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 parquet.example.data.simple.convert;
-
-import parquet.example.data.Group;
-import parquet.io.api.Converter;
-import parquet.io.api.GroupConverter;
-import parquet.schema.GroupType;
-import parquet.schema.Type;
-
-class SimpleGroupConverter extends GroupConverter {
-  private final SimpleGroupConverter parent;
-  private final int index;
-  protected Group current;
-  private Converter[] converters;
-
-  SimpleGroupConverter(SimpleGroupConverter parent, int index, GroupType schema) {
-    this.parent = parent;
-    this.index = index;
-
-    converters = new Converter[schema.getFieldCount()];
-
-    for (int i = 0; i < converters.length; i++) {
-      final Type type = schema.getType(i);
-      if (type.isPrimitive()) {
-        converters[i] = new SimplePrimitiveConverter(this, i);
-      } else {
-        converters[i] = new SimpleGroupConverter(this, i, type.asGroupType());
-      }
-
-    }
-  }
-
-  @Override
-  public void start() {
-    current = parent.getCurrentRecord().addGroup(index);
-  }
-
-  @Override
-  public Converter getConverter(int fieldIndex) {
-    return converters[fieldIndex];
-  }
-
-  @Override
-  public void end() {
-  }
-
-  public Group getCurrentRecord() {
-    return current;
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/example/data/simple/convert/SimplePrimitiveConverter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/example/data/simple/convert/SimplePrimitiveConverter.java b/parquet-column/src/main/java/parquet/example/data/simple/convert/SimplePrimitiveConverter.java
deleted file mode 100644
index 0870aa4..0000000
--- a/parquet-column/src/main/java/parquet/example/data/simple/convert/SimplePrimitiveConverter.java
+++ /dev/null
@@ -1,88 +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 parquet.example.data.simple.convert;
-
-import parquet.io.api.Binary;
-import parquet.io.api.PrimitiveConverter;
-
-class SimplePrimitiveConverter extends PrimitiveConverter {
-
-  private final SimpleGroupConverter parent;
-  private final int index;
-
-  SimplePrimitiveConverter(SimpleGroupConverter parent, int index) {
-    this.parent = parent;
-    this.index = index;
-  }
-
-  /**
-   * {@inheritDoc}
-   * @see parquet.io.api.PrimitiveConverter#addBinary(Binary)
-   */
-  @Override
-  public void addBinary(Binary value) {
-    parent.getCurrentRecord().add(index, value);
-  }
-
-  /**
-   * {@inheritDoc}
-   * @see parquet.io.api.PrimitiveConverter#addBoolean(boolean)
-   */
-  @Override
-  public void addBoolean(boolean value) {
-    parent.getCurrentRecord().add(index, value);
-  }
-
-  /**
-   * {@inheritDoc}
-   * @see parquet.io.api.PrimitiveConverter#addDouble(double)
-   */
-  @Override
-  public void addDouble(double value) {
-    parent.getCurrentRecord().add(index, value);
-  }
-
-  /**
-   * {@inheritDoc}
-   * @see parquet.io.api.PrimitiveConverter#addFloat(float)
-   */
-  @Override
-  public void addFloat(float value) {
-    parent.getCurrentRecord().add(index, value);
-  }
-
-  /**
-   * {@inheritDoc}
-   * @see parquet.io.api.PrimitiveConverter#addInt(int)
-   */
-  @Override
-  public void addInt(int value) {
-    parent.getCurrentRecord().add(index, value);
-  }
-
-  /**
-   * {@inheritDoc}
-   * @see parquet.io.api.PrimitiveConverter#addLong(long)
-   */
-  @Override
-  public void addLong(long value) {
-    parent.getCurrentRecord().add(index, value);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/AndRecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/AndRecordFilter.java b/parquet-column/src/main/java/parquet/filter/AndRecordFilter.java
deleted file mode 100644
index c643f6c..0000000
--- a/parquet-column/src/main/java/parquet/filter/AndRecordFilter.java
+++ /dev/null
@@ -1,64 +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 parquet.filter;
-
-import parquet.Preconditions;
-import parquet.column.ColumnReader;
-
-/**
- * Provides ability to chain two filters together. Bear in mind that the first one will
- * short circuit the second. Useful if getting a page of already filtered result.
- *  i.e and( column("manufacturer", equalTo("Volkswagen")), page(100,50))
- *
- * @author Jacob Metcalf
- */
-public final class AndRecordFilter implements RecordFilter {
-
-  private final RecordFilter boundFilter1;
-  private final RecordFilter boundFilter2;
-
-  /**
-   * Returns builder for creating an and filter.
-   * @param filter1 The first filter to check.
-   * @param filter2 The second filter to check.
-   */
-  public static final UnboundRecordFilter and( final UnboundRecordFilter filter1, final UnboundRecordFilter filter2 ) {
-    Preconditions.checkNotNull( filter1, "filter1" );
-    Preconditions.checkNotNull( filter2, "filter2" );
-    return new UnboundRecordFilter() {
-      @Override
-      public RecordFilter bind(Iterable<ColumnReader> readers) {
-        return new AndRecordFilter( filter1.bind(readers), filter2.bind( readers) );
-      }
-    };
-  }
-
-  /**
-   * Private constructor, use AndRecordFilter.and() instead.
-   */
-  private AndRecordFilter( RecordFilter boundFilter1, RecordFilter boundFilter2 ) {
-    this.boundFilter1 = boundFilter1;
-    this.boundFilter2 = boundFilter2;
-  }
-
-  @Override
-  public boolean isMatch() {
-    return boundFilter1.isMatch() && boundFilter2.isMatch();
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/ColumnPredicates.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/ColumnPredicates.java b/parquet-column/src/main/java/parquet/filter/ColumnPredicates.java
deleted file mode 100644
index 0ab5598..0000000
--- a/parquet-column/src/main/java/parquet/filter/ColumnPredicates.java
+++ /dev/null
@@ -1,190 +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 parquet.filter;
-
-import parquet.Preconditions;
-import parquet.column.ColumnReader;
-import parquet.io.api.Binary;
-
-/**
- * ColumnPredicates class provides checks for column values. Factory methods
- * are provided for standard predicates which wrap the job of getting the
- * correct value from the column.
- */
-public class ColumnPredicates {
-
-  public static interface Predicate {
-    boolean apply(ColumnReader input);
-  }
-
-  public static interface PredicateFunction <T> {
-    boolean functionToApply(T input);
-  }
-
-  /* provide the following to avoid boxing primitives */
-
-  public static interface IntegerPredicateFunction {
-    boolean functionToApply(int input);
-  }
-
-  public static interface LongPredicateFunction {
-    boolean functionToApply(long input);
-  }
-
-  public static interface FloatPredicateFunction {
-    boolean functionToApply(float input);
-  }
-
-  public static interface DoublePredicateFunction {
-    boolean functionToApply(double input);
-  }
-
-  public static interface BooleanPredicateFunction {
-    boolean functionToApply(boolean input);
-  }
-
-  public static Predicate equalTo(final String target) {
-    Preconditions.checkNotNull(target,"target");
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return target.equals(input.getBinary().toStringUsingUTF8());
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToString(final PredicateFunction<String> fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-          return fn.functionToApply(input.getBinary().toStringUsingUTF8());
-      }
-    };
-  }
-
-  public static Predicate equalTo(final int target) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return input.getInteger() == target;
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToInteger(final IntegerPredicateFunction fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return fn.functionToApply(input.getInteger());
-      }
-    };
-  }
-
-  public static Predicate equalTo(final long target) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return input.getLong() == target;
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToLong(final LongPredicateFunction fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return fn.functionToApply(input.getLong());
-      }
-    };
-  }
-
-  public static Predicate equalTo(final float target) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return input.getFloat() == target;
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToFloat(final FloatPredicateFunction fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return fn.functionToApply(input.getFloat());
-      }
-    };
-  }
-
-  public static Predicate equalTo(final double target) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return input.getDouble() == target;
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToDouble(final DoublePredicateFunction fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return fn.functionToApply(input.getDouble());
-      }
-    };
-  }
-
-  public static Predicate equalTo(final boolean target) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return input.getBoolean() == target;
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToBoolean (final BooleanPredicateFunction fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return fn.functionToApply(input.getBoolean());
-      }
-    };
-  }
-
-  public static <E extends Enum> Predicate equalTo(final E target) {
-    Preconditions.checkNotNull(target,"target");
-    final String targetAsString = target.name();
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-        return targetAsString.equals(input.getBinary().toStringUsingUTF8());
-      }
-    };
-  }
-
-  public static Predicate applyFunctionToBinary (final PredicateFunction<Binary> fn) {
-    return new Predicate() {
-      @Override
-      public boolean apply(ColumnReader input) {
-	  return fn.functionToApply(input.getBinary());
-      }
-    };
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/ColumnRecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/ColumnRecordFilter.java b/parquet-column/src/main/java/parquet/filter/ColumnRecordFilter.java
deleted file mode 100644
index add4ab4..0000000
--- a/parquet-column/src/main/java/parquet/filter/ColumnRecordFilter.java
+++ /dev/null
@@ -1,75 +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 parquet.filter;
-
-import parquet.column.ColumnReader;
-import java.util.Arrays;
-import static parquet.Preconditions.checkNotNull;
-
-/**
- * Record filter which applies the supplied predicate to the specified column.
- */
-public final class ColumnRecordFilter implements RecordFilter {
-
-  private final ColumnReader filterOnColumn;
-  private final ColumnPredicates.Predicate filterPredicate;
-
-  /**
-   * Factory method for record filter which applies the supplied predicate to the specified column.
-   * Note that if searching for a repeated sub-attribute it will only ever match against the
-   * first instance of it in the object.
-   *
-   * @param columnPath Dot separated path specifier, e.g. "engine.capacity"
-   * @param predicate Should call getBinary etc. and check the value
-   */
-  public static final UnboundRecordFilter column(final String columnPath,
-                                                 final ColumnPredicates.Predicate predicate) {
-    checkNotNull(columnPath, "columnPath");
-    checkNotNull(predicate,  "predicate");
-    return new UnboundRecordFilter() {
-      final String[] filterPath = columnPath.split("\\.");
-      @Override
-      public RecordFilter bind(Iterable<ColumnReader> readers) {
-        for (ColumnReader reader : readers) {
-          if ( Arrays.equals( reader.getDescriptor().getPath(), filterPath)) {
-            return new ColumnRecordFilter(reader, predicate);
-          }
-        }
-        throw new IllegalArgumentException( "Column " + columnPath + " does not exist.");
-      }
-    };
-  }
-
-  /**
-   * Private constructor. Use column() instead.
-   */
-  private ColumnRecordFilter(ColumnReader filterOnColumn, ColumnPredicates.Predicate filterPredicate) {
-    this.filterOnColumn  = filterOnColumn;
-    this.filterPredicate = filterPredicate;
-  }
-
-  /**
-   * @return true if the current value for the column reader matches the predicate.
-   */
-  @Override
-  public boolean isMatch() {
-    return filterPredicate.apply(filterOnColumn);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/NotRecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/NotRecordFilter.java b/parquet-column/src/main/java/parquet/filter/NotRecordFilter.java
deleted file mode 100644
index 2cc66f9..0000000
--- a/parquet-column/src/main/java/parquet/filter/NotRecordFilter.java
+++ /dev/null
@@ -1,58 +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 parquet.filter;
-
-import parquet.Preconditions;
-import parquet.column.ColumnReader;
-
-/**
- * Provides ability to negate the result of a filter.
- *
- * @author Frank Austin Nothaft
- */
-public final class NotRecordFilter implements RecordFilter {
-
-  private final RecordFilter boundFilter;
-
-  /**
-   * Returns builder for creating an and filter.
-   * @param filter The filter to invert.
-   */
-  public static final UnboundRecordFilter not( final UnboundRecordFilter filter) {
-    Preconditions.checkNotNull( filter, "filter" );
-    return new UnboundRecordFilter() {
-      @Override
-      public RecordFilter bind(Iterable<ColumnReader> readers) {
-        return new NotRecordFilter( filter.bind(readers) );
-      }
-    };
-  }
-
-  /**
-   * Private constructor, use NotRecordFilter.not() instead.
-   */
-  private NotRecordFilter( RecordFilter boundFilter) {
-    this.boundFilter = boundFilter;
-  }
-
-  @Override
-  public boolean isMatch() {
-    return !(boundFilter.isMatch());
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/OrRecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/OrRecordFilter.java b/parquet-column/src/main/java/parquet/filter/OrRecordFilter.java
deleted file mode 100644
index 584aa2a..0000000
--- a/parquet-column/src/main/java/parquet/filter/OrRecordFilter.java
+++ /dev/null
@@ -1,62 +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 parquet.filter;
-
-import parquet.Preconditions;
-import parquet.column.ColumnReader;
-
-/**
- * Provides ability to chain two filters together.
- *
- * @author Frank Austin Nothaft
- */
-public final class OrRecordFilter implements RecordFilter {
-
-  private final RecordFilter boundFilter1;
-  private final RecordFilter boundFilter2;
-
-  /**
-   * Returns builder for creating an and filter.
-   * @param filter1 The first filter to check.
-   * @param filter2 The second filter to check.
-   */
-  public static final UnboundRecordFilter or( final UnboundRecordFilter filter1, final UnboundRecordFilter filter2 ) {
-    Preconditions.checkNotNull( filter1, "filter1" );
-    Preconditions.checkNotNull( filter2, "filter2" );
-    return new UnboundRecordFilter() {
-      @Override
-      public RecordFilter bind(Iterable<ColumnReader> readers) {
-        return new OrRecordFilter( filter1.bind(readers), filter2.bind( readers) );
-      }
-    };
-  }
-
-  /**
-   * Private constructor, use OrRecordFilter.or() instead.
-   */
-  private OrRecordFilter( RecordFilter boundFilter1, RecordFilter boundFilter2 ) {
-    this.boundFilter1 = boundFilter1;
-    this.boundFilter2 = boundFilter2;
-  }
-
-  @Override
-  public boolean isMatch() {
-    return boundFilter1.isMatch() || boundFilter2.isMatch();
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/PagedRecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/PagedRecordFilter.java b/parquet-column/src/main/java/parquet/filter/PagedRecordFilter.java
deleted file mode 100644
index 46e998c..0000000
--- a/parquet-column/src/main/java/parquet/filter/PagedRecordFilter.java
+++ /dev/null
@@ -1,64 +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 parquet.filter;
-
-import parquet.column.ColumnReader;
-
-/**
- * Filter which will only materialize a page worth of results.
- */
-public final class PagedRecordFilter implements RecordFilter {
-
-  private final long startPos;
-  private final long endPos;
-  private long currentPos = 0;
-
-  /**
-   * Returns builder for creating a paged query.
-   * @param startPos The record to start from, numbering starts at 1.
-   * @param pageSize The size of the page.
-   */
-  public static final UnboundRecordFilter page( final long startPos, final long pageSize ) {
-    return new UnboundRecordFilter() {
-      @Override
-      public RecordFilter bind(Iterable<ColumnReader> readers) {
-        return new PagedRecordFilter( startPos, pageSize );
-      }
-    };
-  }
-
-  /**
-   * Private constructor, use column() instead.
-   */
-  private PagedRecordFilter(long startPos, long pageSize) {
-    this.startPos = startPos;
-    this.endPos   = startPos + pageSize;
-  }
-
-  /**
-   * Keeps track of how many times it is called. Only returns matches when the
-   * record number is in the range.
-   */
-  @Override
-  public boolean isMatch() {
-    currentPos++;
-    return (( currentPos >= startPos ) && ( currentPos < endPos ));
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/RecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/RecordFilter.java b/parquet-column/src/main/java/parquet/filter/RecordFilter.java
deleted file mode 100644
index 7b3852a..0000000
--- a/parquet-column/src/main/java/parquet/filter/RecordFilter.java
+++ /dev/null
@@ -1,34 +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 parquet.filter;
-
-
-/**
- * Filter to be applied to a record to work out whether to skip it.
- *
- * @author Jacob Metcalf
- */
-public interface RecordFilter {
-
-  /**
-   * Works out whether the current record can pass through the filter.
-   */
-  boolean isMatch();
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter/UnboundRecordFilter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter/UnboundRecordFilter.java b/parquet-column/src/main/java/parquet/filter/UnboundRecordFilter.java
deleted file mode 100644
index 1f08e96..0000000
--- a/parquet-column/src/main/java/parquet/filter/UnboundRecordFilter.java
+++ /dev/null
@@ -1,36 +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 parquet.filter;
-
-import parquet.column.ColumnReader;
-
-/**
- * Builder for a record filter. Idea is that each filter provides a create function
- * which returns an unbound filter. This only becomes a filter when it is bound to the actual
- * columns.
- *
- * @author Jacob Metcalf
- */
-public interface UnboundRecordFilter {
-
-  /**
-   * Call to bind to actual columns and create filter.
-   */
-  RecordFilter bind( Iterable<ColumnReader> readers);
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter2/compat/FilterCompat.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter2/compat/FilterCompat.java b/parquet-column/src/main/java/parquet/filter2/compat/FilterCompat.java
deleted file mode 100644
index 4bd4e23..0000000
--- a/parquet-column/src/main/java/parquet/filter2/compat/FilterCompat.java
+++ /dev/null
@@ -1,158 +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 parquet.filter2.compat;
-
-import parquet.Log;
-import parquet.filter.UnboundRecordFilter;
-import parquet.filter2.predicate.FilterPredicate;
-import parquet.filter2.predicate.LogicalInverseRewriter;
-
-import static parquet.Preconditions.checkArgument;
-import static parquet.Preconditions.checkNotNull;
-
-/**
- * Parquet currently has two ways to specify a filter for dropping records at read time.
- * The first way, that only supports filtering records during record assembly, is found
- * in {@link parquet.filter}. The new API (found in {@link parquet.filter2}) supports
- * also filtering entire rowgroups of records without reading them at all.
- *
- * This class defines a common interface that both of these filters share,
- * {@link Filter}. A Filter can be either an {@link UnboundRecordFilter} from the old API, or
- * a {@link FilterPredicate} from the new API, or a sentinel no-op filter.
- *
- * Having this common interface simplifies passing a filter through the read path of parquet's
- * codebase.
- */
-public class FilterCompat {
-  private static final Log LOG = Log.getLog(FilterCompat.class);
-
-  /**
-   * Anyone wanting to use a {@link Filter} need only implement this interface,
-   * per the visitor pattern.
-   */
-  public static interface Visitor<T> {
-    T visit(FilterPredicateCompat filterPredicateCompat);
-    T visit(UnboundRecordFilterCompat unboundRecordFilterCompat);
-    T visit(NoOpFilter noOpFilter);
-  }
-
-  public static interface Filter {
-    <R> R accept(Visitor<R> visitor);
-  }
-
-  // sentinel no op filter that signals "do no filtering"
-  public static final Filter NOOP = new NoOpFilter();
-
-  /**
-   * Given a FilterPredicate, return a Filter that wraps it.
-   * This method also logs the filter being used and rewrites
-   * the predicate to not include the not() operator.
-   */
-  public static Filter get(FilterPredicate filterPredicate) {
-    checkNotNull(filterPredicate, "filterPredicate");
-
-    LOG.info("Filtering using predicate: " + filterPredicate);
-
-    // rewrite the predicate to not include the not() operator
-    FilterPredicate collapsedPredicate = LogicalInverseRewriter.rewrite(filterPredicate);
-
-    if (!filterPredicate.equals(collapsedPredicate)) {
-      LOG.info("Predicate has been collapsed to: " + collapsedPredicate);
-    }
-
-    return new FilterPredicateCompat(collapsedPredicate);
-  }
-
-  /**
-   * Given an UnboundRecordFilter, return a Filter that wraps it.
-   */
-  public static Filter get(UnboundRecordFilter unboundRecordFilter) {
-    return new UnboundRecordFilterCompat(unboundRecordFilter);
-  }
-
-  /**
-   * Given either a FilterPredicate or the class of an UnboundRecordFilter, or neither (but not both)
-   * return a Filter that wraps whichever was provided.
-   *
-   * Either filterPredicate or unboundRecordFilterClass must be null, or an exception is thrown.
-   *
-   * If both are null, the no op filter will be returned.
-   */
-  public static Filter get(FilterPredicate filterPredicate, UnboundRecordFilter unboundRecordFilter) {
-    checkArgument(filterPredicate == null || unboundRecordFilter == null,
-        "Cannot provide both a FilterPredicate and an UnboundRecordFilter");
-
-    if (filterPredicate != null) {
-      return get(filterPredicate);
-    }
-
-    if (unboundRecordFilter != null) {
-      return get(unboundRecordFilter);
-    }
-
-    return NOOP;
-  }
-
-  // wraps a FilterPredicate
-  public static final class FilterPredicateCompat implements Filter {
-    private final FilterPredicate filterPredicate;
-
-    private FilterPredicateCompat(FilterPredicate filterPredicate) {
-      this.filterPredicate = checkNotNull(filterPredicate, "filterPredicate");
-    }
-
-    public FilterPredicate getFilterPredicate() {
-      return filterPredicate;
-    }
-
-    @Override
-    public <R> R accept(Visitor<R> visitor) {
-      return visitor.visit(this);
-    }
-  }
-
-  // wraps an UnboundRecordFilter
-  public static final class UnboundRecordFilterCompat implements Filter {
-    private final UnboundRecordFilter unboundRecordFilter;
-
-    private UnboundRecordFilterCompat(UnboundRecordFilter unboundRecordFilter) {
-      this.unboundRecordFilter = checkNotNull(unboundRecordFilter, "unboundRecordFilter");
-    }
-
-    public UnboundRecordFilter getUnboundRecordFilter() {
-      return unboundRecordFilter;
-    }
-
-    @Override
-    public <R> R accept(Visitor<R> visitor) {
-      return visitor.visit(this);
-    }
-  }
-
-  // sentinel no op filter
-  public static final class NoOpFilter implements Filter {
-    private NoOpFilter() {}
-
-    @Override
-    public <R> R accept(Visitor<R> visitor) {
-      return visitor.visit(this);
-    }
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter2/predicate/FilterApi.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter2/predicate/FilterApi.java b/parquet-column/src/main/java/parquet/filter2/predicate/FilterApi.java
deleted file mode 100644
index 6485a6e..0000000
--- a/parquet-column/src/main/java/parquet/filter2/predicate/FilterApi.java
+++ /dev/null
@@ -1,212 +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 parquet.filter2.predicate;
-
-import java.io.Serializable;
-
-import parquet.hadoop.metadata.ColumnPath;
-import parquet.filter2.predicate.Operators.And;
-import parquet.filter2.predicate.Operators.BinaryColumn;
-import parquet.filter2.predicate.Operators.BooleanColumn;
-import parquet.filter2.predicate.Operators.Column;
-import parquet.filter2.predicate.Operators.DoubleColumn;
-import parquet.filter2.predicate.Operators.Eq;
-import parquet.filter2.predicate.Operators.FloatColumn;
-import parquet.filter2.predicate.Operators.Gt;
-import parquet.filter2.predicate.Operators.GtEq;
-import parquet.filter2.predicate.Operators.IntColumn;
-import parquet.filter2.predicate.Operators.LongColumn;
-import parquet.filter2.predicate.Operators.Lt;
-import parquet.filter2.predicate.Operators.LtEq;
-import parquet.filter2.predicate.Operators.Not;
-import parquet.filter2.predicate.Operators.NotEq;
-import parquet.filter2.predicate.Operators.Or;
-import parquet.filter2.predicate.Operators.SupportsEqNotEq;
-import parquet.filter2.predicate.Operators.SupportsLtGt;
-import parquet.filter2.predicate.Operators.UserDefined;
-import parquet.filter2.predicate.Operators.UserDefinedByClass;
-import parquet.filter2.predicate.Operators.UserDefinedByInstance;
-
-/**
- * The Filter API is expressed through these static methods.
- *
- * Example usage:
- * {@code
- *
- *   IntColumn foo = intColumn("foo");
- *   DoubleColumn bar = doubleColumn("x.y.bar");
- *
- *   // foo == 10 || bar <= 17.0
- *   FilterPredicate pred = or(eq(foo, 10), ltEq(bar, 17.0));
- *
- * }
- */
-// TODO: Support repeated columns (https://issues.apache.org/jira/browse/PARQUET-34)
-//
-// TODO: Support filtering on groups (eg, filter where this group is / isn't null)
-// TODO: (https://issues.apache.org/jira/browse/PARQUET-43)
-
-// TODO: Consider adding support for more column types that aren't coupled with parquet types, eg Column<String>
-// TODO: (https://issues.apache.org/jira/browse/PARQUET-35)
-public final class FilterApi {
-  private FilterApi() { }
-
-  public static IntColumn intColumn(String columnPath) {
-    return new IntColumn(ColumnPath.fromDotString(columnPath));
-  }
-
-  public static LongColumn longColumn(String columnPath) {
-    return new LongColumn(ColumnPath.fromDotString(columnPath));
-  }
-
-  public static FloatColumn floatColumn(String columnPath) {
-    return new FloatColumn(ColumnPath.fromDotString(columnPath));
-  }
-
-  public static DoubleColumn doubleColumn(String columnPath) {
-    return new DoubleColumn(ColumnPath.fromDotString(columnPath));
-  }
-
-  public static BooleanColumn booleanColumn(String columnPath) {
-    return new BooleanColumn(ColumnPath.fromDotString(columnPath));
-  }
-
-  public static BinaryColumn binaryColumn(String columnPath) {
-    return new BinaryColumn(ColumnPath.fromDotString(columnPath));
-  }
-
-  /**
-   * Keeps records if their value is equal to the provided value.
-   * Nulls are treated the same way the java programming language does.
-   * For example:
-   *   eq(column, null) will keep all records whose value is null.
-   *   eq(column, 7) will keep all records whose value is 7, and will drop records whose value is null
-   */
-  public static <T extends Comparable<T>, C extends Column<T> & SupportsEqNotEq> Eq<T> eq(C column, T value) {
-    return new Eq<T>(column, value);
-  }
-
-  /**
-   * Keeps records if their value is not equal to the provided value.
-   * Nulls are treated the same way the java programming language does.
-   * For example:
-   *   notEq(column, null) will keep all records whose value is not null.
-   *   notEq(column, 7) will keep all records whose value is not 7, including records whose value is null.
-   *
-   *   NOTE: this is different from how some query languages handle null. For example, SQL and pig will drop
-   *   nulls when you filter by not equal to 7. To achieve similar behavior in this api, do:
-   *   and(notEq(column, 7), notEq(column, null))
-   *
-   *   NOTE: be sure to read the {@link #lt}, {@link #ltEq}, {@link #gt}, {@link #gtEq} operator's docs
-   *         for how they handle nulls
-   */
-  public static <T extends Comparable<T>, C extends Column<T> & SupportsEqNotEq> NotEq<T> notEq(C column, T value) {
-    return new NotEq<T>(column, value);
-  }
-
-  /**
-   * Keeps records if their value is less than (but not equal to) the provided value.
-   * The provided value cannot be null, as less than null has no meaning.
-   * Records with null values will be dropped.
-   * For example:
-   *   lt(column, 7) will keep all records whose value is less than (but not equal to) 7, and not null.
-   */
-  public static <T extends Comparable<T>, C extends Column<T> & SupportsLtGt> Lt<T> lt(C column, T value) {
-    return new Lt<T>(column, value);
-  }
-
-  /**
-   * Keeps records if their value is less than or equal to the provided value.
-   * The provided value cannot be null, as less than null has no meaning.
-   * Records with null values will be dropped.
-   * For example:
-   *   ltEq(column, 7) will keep all records whose value is less than or equal to 7, and not null.
-   */
-  public static <T extends Comparable<T>, C extends Column<T> & SupportsLtGt> LtEq<T> ltEq(C column, T value) {
-    return new LtEq<T>(column, value);
-  }
-
-  /**
-   * Keeps records if their value is greater than (but not equal to) the provided value.
-   * The provided value cannot be null, as less than null has no meaning.
-   * Records with null values will be dropped.
-   * For example:
-   *   gt(column, 7) will keep all records whose value is greater than (but not equal to) 7, and not null.
-   */
-  public static <T extends Comparable<T>, C extends Column<T> & SupportsLtGt> Gt<T> gt(C column, T value) {
-    return new Gt<T>(column, value);
-  }
-
-  /**
-   * Keeps records if their value is greater than or equal to the provided value.
-   * The provided value cannot be null, as less than null has no meaning.
-   * Records with null values will be dropped.
-   * For example:
-   *   gtEq(column, 7) will keep all records whose value is greater than or equal to 7, and not null.
-   */
-  public static <T extends Comparable<T>, C extends Column<T> & SupportsLtGt> GtEq<T> gtEq(C column, T value) {
-    return new GtEq<T>(column, value);
-  }
-
-  /**
-   * Keeps records that pass the provided {@link UserDefinedPredicate}
-   *
-   * The provided class must have a default constructor. To use an instance
-   * of a UserDefinedPredicate instead, see {@link #userDefined(column, udp)} below.
-   */
-  public static <T extends Comparable<T>, U extends UserDefinedPredicate<T>>
-    UserDefined<T, U> userDefined(Column<T> column, Class<U> clazz) {
-    return new UserDefinedByClass<T, U>(column, clazz);
-  }
-  
-  /**
-   * Keeps records that pass the provided {@link UserDefinedPredicate}
-   *
-   * The provided instance of UserDefinedPredicate must be serializable.
-   */
-  public static <T extends Comparable<T>, U extends UserDefinedPredicate<T> & Serializable>
-    UserDefined<T, U> userDefined(Column<T> column, U udp) {
-    return new UserDefinedByInstance<T, U>(column, udp);
-  }
-
-  /**
-   * Constructs the logical and of two predicates. Records will be kept if both the left and right predicate agree
-   * that the record should be kept.
-   */
-  public static FilterPredicate and(FilterPredicate left, FilterPredicate right) {
-    return new And(left, right);
-  }
-
-  /**
-   * Constructs the logical or of two predicates. Records will be kept if either the left or right predicate
-   * is satisfied (or both).
-   */
-  public static FilterPredicate or(FilterPredicate left, FilterPredicate right) {
-    return new Or(left, right);
-  }
-
-  /**
-   * Constructs the logical not (or inverse) of a predicate.
-   * Records will be kept if the provided predicate is not satisfied.
-   */
-  public static FilterPredicate not(FilterPredicate predicate) {
-    return new Not(predicate);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter2/predicate/FilterPredicate.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter2/predicate/FilterPredicate.java b/parquet-column/src/main/java/parquet/filter2/predicate/FilterPredicate.java
deleted file mode 100644
index 14de764..0000000
--- a/parquet-column/src/main/java/parquet/filter2/predicate/FilterPredicate.java
+++ /dev/null
@@ -1,72 +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 parquet.filter2.predicate;
-
-import parquet.filter2.predicate.Operators.And;
-import parquet.filter2.predicate.Operators.Eq;
-import parquet.filter2.predicate.Operators.Gt;
-import parquet.filter2.predicate.Operators.GtEq;
-import parquet.filter2.predicate.Operators.LogicalNotUserDefined;
-import parquet.filter2.predicate.Operators.Lt;
-import parquet.filter2.predicate.Operators.LtEq;
-import parquet.filter2.predicate.Operators.Not;
-import parquet.filter2.predicate.Operators.NotEq;
-import parquet.filter2.predicate.Operators.Or;
-import parquet.filter2.predicate.Operators.UserDefined;
-
-/**
- * A FilterPredicate is an expression tree describing the criteria for which records to keep when loading data from
- * a parquet file. These predicates are applied in multiple places. Currently, they are applied to all row groups at
- * job submission time to see if we can potentially drop entire row groups, and then they are applied during column
- * assembly to drop individual records that are not wanted.
- *
- * FilterPredicates do not contain closures or instances of anonymous classes, rather they are expressed as
- * an expression tree of operators.
- *
- * FilterPredicates are implemented in terms of the visitor pattern.
- *
- * See {@link Operators} for the implementation of the operator tokens,
- * and {@link FilterApi} for the dsl functions for constructing an expression tree.
- */
-public interface FilterPredicate {
-
-  /**
-   * A FilterPredicate must accept a Visitor, per the visitor pattern.
-   */
-  <R> R accept(Visitor<R> visitor);
-
-  /**
-   * A FilterPredicate Visitor must visit all the operators in a FilterPredicate expression tree,
-   * and must handle recursion itself, per the visitor pattern.
-   */
-  public static interface Visitor<R> {
-    <T extends Comparable<T>> R visit(Eq<T> eq);
-    <T extends Comparable<T>> R visit(NotEq<T> notEq);
-    <T extends Comparable<T>> R visit(Lt<T> lt);
-    <T extends Comparable<T>> R visit(LtEq<T> ltEq);
-    <T extends Comparable<T>> R visit(Gt<T> gt);
-    <T extends Comparable<T>> R visit(GtEq<T> gtEq);
-    R visit(And and);
-    R visit(Or or);
-    R visit(Not not);
-    <T extends Comparable<T>, U extends UserDefinedPredicate<T>> R visit(UserDefined<T, U> udp);
-    <T extends Comparable<T>, U extends UserDefinedPredicate<T>> R visit(LogicalNotUserDefined<T, U> udp);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverseRewriter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverseRewriter.java b/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverseRewriter.java
deleted file mode 100644
index ea1bec3..0000000
--- a/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverseRewriter.java
+++ /dev/null
@@ -1,113 +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 parquet.filter2.predicate;
-
-import parquet.filter2.predicate.FilterPredicate.Visitor;
-import parquet.filter2.predicate.Operators.And;
-import parquet.filter2.predicate.Operators.Eq;
-import parquet.filter2.predicate.Operators.Gt;
-import parquet.filter2.predicate.Operators.GtEq;
-import parquet.filter2.predicate.Operators.LogicalNotUserDefined;
-import parquet.filter2.predicate.Operators.Lt;
-import parquet.filter2.predicate.Operators.LtEq;
-import parquet.filter2.predicate.Operators.Not;
-import parquet.filter2.predicate.Operators.NotEq;
-import parquet.filter2.predicate.Operators.Or;
-import parquet.filter2.predicate.Operators.UserDefined;
-
-import static parquet.Preconditions.checkNotNull;
-import static parquet.filter2.predicate.FilterApi.and;
-import static parquet.filter2.predicate.FilterApi.or;
-
-/**
- * Recursively removes all use of the not() operator in a predicate
- * by replacing all instances of not(x) with the inverse(x),
- * eg: not(and(eq(), not(eq(y))) -> or(notEq(), eq(y))
- *
- * The returned predicate should have the same meaning as the original, but
- * without the use of the not() operator.
- *
- * See also {@link LogicalInverter}, which is used
- * to do the inversion.
- */
-public final class LogicalInverseRewriter implements Visitor<FilterPredicate> {
-  private static final LogicalInverseRewriter INSTANCE = new LogicalInverseRewriter();
-
-  public static FilterPredicate rewrite(FilterPredicate pred) {
-    checkNotNull(pred, "pred");
-    return pred.accept(INSTANCE);
-  }
-
-  private LogicalInverseRewriter() { }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(Eq<T> eq) {
-    return eq;
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(NotEq<T> notEq) {
-    return notEq;
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(Lt<T> lt) {
-    return lt;
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(LtEq<T> ltEq) {
-    return ltEq;
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(Gt<T> gt) {
-    return gt;
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(GtEq<T> gtEq) {
-    return gtEq;
-  }
-
-  @Override
-  public FilterPredicate visit(And and) {
-    return and(and.getLeft().accept(this), and.getRight().accept(this));
-  }
-
-  @Override
-  public FilterPredicate visit(Or or) {
-    return or(or.getLeft().accept(this), or.getRight().accept(this));
-  }
-
-  @Override
-  public FilterPredicate visit(Not not) {
-    return LogicalInverter.invert(not.getPredicate().accept(this));
-  }
-
-  @Override
-  public <T extends Comparable<T>, U extends UserDefinedPredicate<T>> FilterPredicate visit(UserDefined<T, U> udp) {
-    return udp;
-  }
-
-  @Override
-  public <T extends Comparable<T>, U extends UserDefinedPredicate<T>> FilterPredicate visit(LogicalNotUserDefined<T, U> udp) {
-    return udp;
-  }
-}

http://git-wip-us.apache.org/repos/asf/parquet-mr/blob/b10870e4/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverter.java
----------------------------------------------------------------------
diff --git a/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverter.java b/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverter.java
deleted file mode 100644
index f060077..0000000
--- a/parquet-column/src/main/java/parquet/filter2/predicate/LogicalInverter.java
+++ /dev/null
@@ -1,108 +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 parquet.filter2.predicate;
-
-import parquet.filter2.predicate.FilterPredicate.Visitor;
-import parquet.filter2.predicate.Operators.And;
-import parquet.filter2.predicate.Operators.Eq;
-import parquet.filter2.predicate.Operators.Gt;
-import parquet.filter2.predicate.Operators.GtEq;
-import parquet.filter2.predicate.Operators.LogicalNotUserDefined;
-import parquet.filter2.predicate.Operators.Lt;
-import parquet.filter2.predicate.Operators.LtEq;
-import parquet.filter2.predicate.Operators.Not;
-import parquet.filter2.predicate.Operators.NotEq;
-import parquet.filter2.predicate.Operators.Or;
-import parquet.filter2.predicate.Operators.UserDefined;
-
-import static parquet.Preconditions.checkNotNull;
-
-/**
- * Converts a {@link FilterPredicate} to its logical inverse.
- * The returned predicate should be equivalent to not(p), but without
- * the use of a not() operator.
- *
- * See also {@link LogicalInverseRewriter}, which can remove the use
- * of all not() operators without inverting the overall predicate.
- */
-public final class LogicalInverter implements Visitor<FilterPredicate> {
-  private static final LogicalInverter INSTANCE = new LogicalInverter();
-
-  public static FilterPredicate invert(FilterPredicate pred) {
-    checkNotNull(pred, "pred");
-    return pred.accept(INSTANCE);
-  }
-
-  private LogicalInverter() {}
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(Eq<T> eq) {
-    return new NotEq<T>(eq.getColumn(), eq.getValue());
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(NotEq<T> notEq) {
-    return new Eq<T>(notEq.getColumn(), notEq.getValue());
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(Lt<T> lt) {
-    return new GtEq<T>(lt.getColumn(), lt.getValue());
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(LtEq<T> ltEq) {
-    return new Gt<T>(ltEq.getColumn(), ltEq.getValue());
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(Gt<T> gt) {
-    return new LtEq<T>(gt.getColumn(), gt.getValue());
-  }
-
-  @Override
-  public <T extends Comparable<T>> FilterPredicate visit(GtEq<T> gtEq) {
-    return new Lt<T>(gtEq.getColumn(), gtEq.getValue());
-  }
-
-  @Override
-  public FilterPredicate visit(And and) {
-    return new Or(and.getLeft().accept(this), and.getRight().accept(this));
-  }
-
-  @Override
-  public FilterPredicate visit(Or or) {
-    return new And(or.getLeft().accept(this), or.getRight().accept(this));
-  }
-
-  @Override
-  public FilterPredicate visit(Not not) {
-    return not.getPredicate();
-  }
-
-  @Override
-  public <T extends Comparable<T>,  U extends UserDefinedPredicate<T>> FilterPredicate visit(UserDefined<T, U> udp) {
-    return new LogicalNotUserDefined<T, U>(udp);
-  }
-
-  @Override
-  public <T extends Comparable<T>,  U extends UserDefinedPredicate<T>> FilterPredicate visit(LogicalNotUserDefined<T, U> udp) {
-    return udp.getUserDefined();
-  }
-}


Mime
View raw message