You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hive.apache.org by kg...@apache.org on 2020/07/28 13:13:07 UTC

[hive] branch master updated: HIVE-23483: Remove DynamicSerDe (#1207) (David Lavati reviewed by Panagiotis Garefalakis and Zoltan Haindrich)

This is an automated email from the ASF dual-hosted git repository.

kgyrtkirk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hive.git


The following commit(s) were added to refs/heads/master by this push:
     new f0c6e92  HIVE-23483: Remove DynamicSerDe (#1207) (David Lavati reviewed by Panagiotis Garefalakis and Zoltan Haindrich)
f0c6e92 is described below

commit f0c6e922d939d9eed31ddddde4af3a5d7864d041
Author: dlavati <dl...@users.noreply.github.com>
AuthorDate: Tue Jul 28 15:12:57 2020 +0200

    HIVE-23483: Remove DynamicSerDe (#1207) (David Lavati reviewed by Panagiotis Garefalakis and Zoltan Haindrich)
---
 .../java/org/apache/hadoop/hive/conf/HiveConf.java |    1 -
 .../hive/serde2/dynamic_type/TestDynamicSerDe.java |  874 ------
 .../replace/AlterTableReplaceColumnsOperation.java |    3 +-
 .../hadoop/hive/ql/exec/ReduceSinkOperator.java    |    1 -
 .../apache/hadoop/hive/ql/exec/mr/ExecReducer.java |    1 -
 .../ql/exec/spark/SparkReduceRecordHandler.java    |    1 -
 .../hadoop/hive/ql/io/HiveBinaryOutputFormat.java  |    2 +-
 .../hive/ql/io/HiveIgnoreKeyTextOutputFormat.java  |    2 +-
 .../test/queries/clientpositive/implicit_cast1.q   |   13 -
 ql/src/test/queries/clientpositive/input19.q       |    5 -
 .../clientpositive/llap/implicit_cast1.q.out       |   52 -
 .../test/results/clientpositive/llap/input19.q.out |   25 -
 serde/README.txt                                   |    2 -
 .../hive/serde2/dynamic_type/DynamicSerDe.java     |  317 --
 .../serde2/dynamic_type/DynamicSerDeAsync.java     |   14 -
 .../dynamic_type/DynamicSerDeCommaOrSemicolon.java |   14 -
 .../serde2/dynamic_type/DynamicSerDeConst.java     |   14 -
 .../serde2/dynamic_type/DynamicSerDeConstList.java |   14 -
 .../DynamicSerDeConstListContents.java             |   14 -
 .../serde2/dynamic_type/DynamicSerDeConstMap.java  |   14 -
 .../dynamic_type/DynamicSerDeConstMapContents.java |   14 -
 .../dynamic_type/DynamicSerDeConstValue.java       |   14 -
 .../dynamic_type/DynamicSerDeDefinition.java       |   14 -
 .../dynamic_type/DynamicSerDeDefinitionType.java   |   14 -
 .../hive/serde2/dynamic_type/DynamicSerDeEnum.java |   14 -
 .../serde2/dynamic_type/DynamicSerDeEnumDef.java   |   14 -
 .../dynamic_type/DynamicSerDeEnumDefList.java      |   14 -
 .../serde2/dynamic_type/DynamicSerDeExtends.java   |   14 -
 .../serde2/dynamic_type/DynamicSerDeField.java     |   51 -
 .../serde2/dynamic_type/DynamicSerDeFieldList.java |  290 --
 .../DynamicSerDeFieldRequiredness.java             |   55 -
 .../serde2/dynamic_type/DynamicSerDeFieldType.java |   48 -
 .../dynamic_type/DynamicSerDeFieldValue.java       |   14 -
 .../serde2/dynamic_type/DynamicSerDeFlagArgs.java  |   14 -
 .../serde2/dynamic_type/DynamicSerDeFunction.java  |   60 -
 .../dynamic_type/DynamicSerDeFunctionType.java     |   14 -
 .../serde2/dynamic_type/DynamicSerDeHeader.java    |   14 -
 .../dynamic_type/DynamicSerDeHeaderList.java       |   14 -
 .../serde2/dynamic_type/DynamicSerDeInclude.java   |   14 -
 .../serde2/dynamic_type/DynamicSerDeNamespace.java |   14 -
 .../serde2/dynamic_type/DynamicSerDeSenum.java     |   14 -
 .../serde2/dynamic_type/DynamicSerDeSenumDef.java  |   14 -
 .../dynamic_type/DynamicSerDeSenumDefList.java     |   14 -
 .../serde2/dynamic_type/DynamicSerDeService.java   |   14 -
 .../dynamic_type/DynamicSerDeSimpleNode.java       |   38 -
 .../serde2/dynamic_type/DynamicSerDeStart.java     |   14 -
 .../serde2/dynamic_type/DynamicSerDeStruct.java    |   59 -
 .../dynamic_type/DynamicSerDeStructBase.java       |  106 -
 .../serde2/dynamic_type/DynamicSerDeThrows.java    |   14 -
 .../serde2/dynamic_type/DynamicSerDeTypeBase.java  |   85 -
 .../serde2/dynamic_type/DynamicSerDeTypeBool.java  |   83 -
 .../serde2/dynamic_type/DynamicSerDeTypeByte.java  |   78 -
 .../dynamic_type/DynamicSerDeTypeDefinition.java   |   14 -
 .../dynamic_type/DynamicSerDeTypeDouble.java       |   82 -
 .../serde2/dynamic_type/DynamicSerDeTypeList.java  |  153 -
 .../serde2/dynamic_type/DynamicSerDeTypeMap.java   |  161 -
 .../serde2/dynamic_type/DynamicSerDeTypeSet.java   |  128 -
 .../dynamic_type/DynamicSerDeTypeString.java       |   81 -
 .../serde2/dynamic_type/DynamicSerDeTypedef.java   |   79 -
 .../serde2/dynamic_type/DynamicSerDeTypei16.java   |   78 -
 .../serde2/dynamic_type/DynamicSerDeTypei32.java   |   82 -
 .../serde2/dynamic_type/DynamicSerDeTypei64.java   |   78 -
 .../dynamic_type/DynamicSerDeUnflagArgs.java       |   14 -
 .../serde2/dynamic_type/DynamicSerDeXception.java  |   14 -
 .../dynamic_type/JJTthrift_grammarState.java       |  131 -
 .../hadoop/hive/serde2/dynamic_type/Node.java      |   43 -
 .../hive/serde2/dynamic_type/ParseException.java   |  185 --
 .../hive/serde2/dynamic_type/SimpleCharStream.java |  417 ---
 .../hive/serde2/dynamic_type/SimpleNode.java       |   85 -
 .../hadoop/hive/serde2/dynamic_type/Token.java     |   78 -
 .../hive/serde2/dynamic_type/TokenMgrError.java    |  136 -
 .../hive/serde2/dynamic_type/thrift_grammar.java   | 3121 --------------------
 .../hive/serde2/dynamic_type/thrift_grammar.jj     | 2367 ---------------
 .../hive/serde2/dynamic_type/thrift_grammar.jjt    |  897 ------
 .../dynamic_type/thrift_grammarConstants.java      |  137 -
 .../dynamic_type/thrift_grammarTokenManager.java   | 1604 ----------
 .../dynamic_type/thrift_grammarTreeConstants.java  |   67 -
 .../serde2/thrift/TBinarySortableProtocol.java     |    4 +-
 .../hive/serde2/thrift/TCTLSeparatedProtocol.java  |   16 +-
 .../apache/hadoop/hive/metastore/ColumnType.java   |    2 +-
 .../hadoop/hive/metastore/conf/MetastoreConf.java  |    1 -
 81 files changed, 14 insertions(+), 12871 deletions(-)

diff --git a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
index d623311..f6649f5 100644
--- a/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
+++ b/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java
@@ -1961,7 +1961,6 @@ public class HiveConf extends Configuration {
         "org.apache.hadoop.hive.ql.io.orc.OrcSerde," +
         "org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe," +
         "org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe," +
-        "org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe," +
         "org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe," +
         "org.apache.hadoop.hive.serde2.columnar.LazyBinaryColumnarSerDe," +
         "org.apache.hadoop.hive.ql.io.parquet.serde.ParquetHiveSerDe," +
diff --git a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java b/itests/hive-unit/src/test/java/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java
deleted file mode 100644
index 8fbd4d4..0000000
--- a/itests/hive-unit/src/test/java/org/apache/hadoop/hive/serde2/dynamic_type/TestDynamicSerDe.java
+++ /dev/null
@@ -1,874 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Properties;
-import java.util.Random;
-import java.util.Map.Entry;
-
-
-
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hive.serde.serdeConstants;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol;
-import org.apache.hadoop.io.BytesWritable;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.fail;
-import static org.junit.Assert.assertTrue;
-import org.junit.Test;
-
-/**
- * TestDynamicSerDe.
- *
- */
-public class TestDynamicSerDe {
-
-  public static HashMap<String, String> makeHashMap(String... params) {
-    HashMap<String, String> r = new HashMap<String, String>();
-    for (int i = 0; i < params.length; i += 2) {
-      r.put(params[i], params[i + 1]);
-    }
-    return r;
-  }
-
-  @Test
-  public void testDynamicSerDe() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = new ArrayList<String>();
-      bye.add("firstString");
-      bye.add("secondString");
-      HashMap<String, Integer> another = new HashMap<String, Integer>();
-      another.put("firstKey", 1);
-      another.put("secondKey", 2);
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(Integer.valueOf(234));
-      struct.add(bye);
-      struct.add(another);
-      struct.add(Integer.valueOf(-234));
-      struct.add(Double.valueOf(1.0));
-      struct.add(Double.valueOf(-2.5));
-
-      // All protocols
-      ArrayList<String> protocols = new ArrayList<String>();
-      ArrayList<Boolean> isBinaries = new ArrayList<Boolean>();
-      ArrayList<HashMap<String, String>> additionalParams = new ArrayList<HashMap<String, String>>();
-
-      protocols
-          .add(org.apache.hadoop.hive.serde2.thrift.TBinarySortableProtocol.class
-          .getName());
-      isBinaries.add(true);
-      additionalParams.add(makeHashMap("serialization.sort.order", "++++++"));
-      protocols
-          .add(org.apache.hadoop.hive.serde2.thrift.TBinarySortableProtocol.class
-          .getName());
-      isBinaries.add(true);
-      additionalParams.add(makeHashMap("serialization.sort.order", "------"));
-
-      protocols.add(org.apache.thrift.protocol.TBinaryProtocol.class.getName());
-      isBinaries.add(true);
-      additionalParams.add(null);
-
-      protocols.add(org.apache.thrift.protocol.TJSONProtocol.class.getName());
-      isBinaries.add(false);
-      additionalParams.add(null);
-
-      // TSimpleJSONProtocol does not support deserialization.
-      // protocols.add(org.apache.thrift.protocol.TSimpleJSONProtocol.class.getName());
-      // isBinaries.add(false);
-      // additionalParams.add(null);
-
-      // TCTLSeparatedProtocol is not done yet.
-      protocols
-          .add(org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      isBinaries.add(false);
-      additionalParams.add(null);
-
-      System.out.println("input struct = " + struct);
-
-      for (int pp = 0; pp < protocols.size(); pp++) {
-
-        String protocol = protocols.get(pp);
-        boolean isBinary = isBinaries.get(pp);
-
-        System.out.println("Testing protocol: " + protocol);
-        Properties schema = new Properties();
-        schema.setProperty(serdeConstants.SERIALIZATION_FORMAT, protocol);
-        schema.setProperty(
-            org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-            "test");
-        schema
-            .setProperty(
-                serdeConstants.SERIALIZATION_DDL,
-                "struct test { i32 _hello, list<string> 2bye, map<string,i32> another, i32 nhello, double d, double nd}");
-        schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-            .getClass().toString());
-        HashMap<String, String> p = additionalParams.get(pp);
-        if (p != null) {
-          for (Entry<String, String> e : p.entrySet()) {
-            schema.setProperty(e.getKey(), e.getValue());
-          }
-        }
-
-        DynamicSerDe serde = new DynamicSerDe();
-        serde.initialize(new Configuration(), schema);
-
-        // Try getObjectInspector
-        ObjectInspector oi = serde.getObjectInspector();
-        System.out.println("TypeName = " + oi.getTypeName());
-
-        // Try to serialize
-        BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-        System.out.println("bytes =" + hexString(bytes));
-
-        if (!isBinary) {
-          System.out.println("bytes in text ="
-              + new String(bytes.get(), 0, bytes.getSize()));
-        }
-
-        // Try to deserialize
-        Object o = serde.deserialize(bytes);
-        System.out.println("o class = " + o.getClass());
-        List<?> olist = (List<?>) o;
-        System.out.println("o size = " + olist.size());
-        System.out.println("o[0] class = " + olist.get(0).getClass());
-        System.out.println("o[1] class = " + olist.get(1).getClass());
-        System.out.println("o[2] class = " + olist.get(2).getClass());
-        System.out.println("o = " + o);
-
-        assertEquals(struct, o);
-      }
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  public String hexString(BytesWritable bytes) {
-    StringBuilder sb = new StringBuilder();
-    for (int i = 0; i < bytes.getSize(); i++) {
-      byte b = bytes.get()[i];
-      int v = (b < 0 ? 256 + b : b);
-      sb.append(String.format("x%02x", v));
-    }
-    return sb.toString();
-  }
-
-  private void testTBinarySortableProtocol(Object[] structs, String ddl,
-      boolean ascending) throws Throwable {
-    int fields = ((List) structs[structs.length - 1]).size();
-    String order = "";
-    for (int i = 0; i < fields; i++) {
-      order = order + (ascending ? "+" : "-");
-    }
-
-    Properties schema = new Properties();
-    schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-        org.apache.hadoop.hive.serde2.thrift.TBinarySortableProtocol.class
-        .getName());
-    schema.setProperty(
-        org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME, "test");
-    schema.setProperty(serdeConstants.SERIALIZATION_DDL, ddl);
-    schema.setProperty(serdeConstants.SERIALIZATION_LIB, DynamicSerDe.class
-        .getName());
-    schema.setProperty(serdeConstants.SERIALIZATION_SORT_ORDER, order);
-
-    DynamicSerDe serde = new DynamicSerDe();
-    serde.initialize(new Configuration(), schema);
-
-    ObjectInspector oi = serde.getObjectInspector();
-
-    // Try to serialize
-    BytesWritable bytes[] = new BytesWritable[structs.length];
-    for (int i = 0; i < structs.length; i++) {
-      bytes[i] = new BytesWritable();
-      BytesWritable s = (BytesWritable) serde.serialize(structs[i], oi);
-      bytes[i].set(s);
-      if (i > 0) {
-        int compareResult = bytes[i - 1].compareTo(bytes[i]);
-        if ((compareResult < 0 && !ascending)
-            || (compareResult > 0 && ascending)) {
-          System.out.println("Test failed in "
-              + (ascending ? "ascending" : "descending") + " order.");
-          System.out.println("serialized data of " + structs[i - 1] + " = "
-              + hexString(bytes[i - 1]));
-          System.out.println("serialized data of " + structs[i] + " = "
-              + hexString(bytes[i]));
-          fail("Sort order of serialized " + structs[i - 1] + " and "
-              + structs[i] + " are reversed!");
-        }
-      }
-    }
-
-    // Try to deserialize
-    Object[] deserialized = new Object[structs.length];
-    for (int i = 0; i < structs.length; i++) {
-      deserialized[i] = serde.deserialize(bytes[i]);
-      if (!structs[i].equals(deserialized[i])) {
-        System.out.println("structs[i] = " + structs[i]);
-        System.out.println("deserialized[i] = " + deserialized[i]);
-        System.out.println("serialized[i] = " + hexString(bytes[i]));
-        assertEquals(structs[i], deserialized[i]);
-      }
-    }
-  }
-
-  static int compare(Object a, Object b) {
-    if (a == null && b == null) {
-      return 0;
-    }
-    if (a == null) {
-      return -1;
-    }
-    if (b == null) {
-      return 1;
-    }
-    if (a instanceof List) {
-      List la = (List) a;
-      List lb = (List) b;
-      assert (la.size() == lb.size());
-      for (int i = 0; i < la.size(); i++) {
-        int r = compare(la.get(i), lb.get(i));
-        if (r != 0) {
-          return r;
-        }
-      }
-      return 0;
-    } else if (a instanceof Number) {
-      Number na = (Number) a;
-      Number nb = (Number) b;
-      if (na.doubleValue() < nb.doubleValue()) {
-        return -1;
-      }
-      if (na.doubleValue() > nb.doubleValue()) {
-        return 1;
-      }
-      return 0;
-    } else if (a instanceof String) {
-      String sa = (String) a;
-      String sb = (String) b;
-      return sa.compareTo(sb);
-    }
-    return 0;
-  }
-
-  private void sort(Object[] structs) {
-    for (int i = 0; i < structs.length; i++) {
-      for (int j = i + 1; j < structs.length; j++) {
-        if (compare(structs[i], structs[j]) > 0) {
-          Object t = structs[i];
-          structs[i] = structs[j];
-          structs[j] = t;
-        }
-      }
-    }
-  }
-
-  @Test
-  public void testTBinarySortableProtocol() throws Throwable {
-    try {
-
-      System.out.println("Beginning Test testTBinarySortableProtocol:");
-
-      int num = 100;
-      Random r = new Random(1234);
-      Object structs[] = new Object[num];
-      String ddl;
-
-      // Test double
-      for (int i = 0; i < num; i++) {
-        ArrayList<Object> struct = new ArrayList<Object>();
-        if (i == 0) {
-          struct.add(null);
-        } else {
-          struct.add(Double.valueOf((r.nextDouble() - 0.5) * 10));
-        }
-        structs[i] = struct;
-      }
-      sort(structs);
-      ddl = "struct test { double hello}";
-      System.out.println("Testing " + ddl);
-      testTBinarySortableProtocol(structs, ddl, true);
-      testTBinarySortableProtocol(structs, ddl, false);
-
-      // Test integer
-      for (int i = 0; i < num; i++) {
-        ArrayList<Object> struct = new ArrayList<Object>();
-        if (i == 0) {
-          struct.add(null);
-        } else {
-          struct.add((int) ((r.nextDouble() - 0.5) * 1.5 * Integer.MAX_VALUE));
-        }
-        structs[i] = struct;
-      }
-      sort(structs);
-      // Null should be smaller than any other value, so put a null at the front
-      // end
-      // to test whether that is held.
-      ((List) structs[0]).set(0, null);
-      ddl = "struct test { i32 hello}";
-      System.out.println("Testing " + ddl);
-      testTBinarySortableProtocol(structs, ddl, true);
-      testTBinarySortableProtocol(structs, ddl, false);
-
-      // Test long
-      for (int i = 0; i < num; i++) {
-        ArrayList<Object> struct = new ArrayList<Object>();
-        if (i == 0) {
-          struct.add(null);
-        } else {
-          struct.add((long) ((r.nextDouble() - 0.5) * 1.5 * Long.MAX_VALUE));
-        }
-        structs[i] = struct;
-      }
-      sort(structs);
-      // Null should be smaller than any other value, so put a null at the front
-      // end
-      // to test whether that is held.
-      ((List) structs[0]).set(0, null);
-      ddl = "struct test { i64 hello}";
-      System.out.println("Testing " + ddl);
-      testTBinarySortableProtocol(structs, ddl, true);
-      testTBinarySortableProtocol(structs, ddl, false);
-
-      // Test string
-      for (int i = 0; i < num; i++) {
-        ArrayList<Object> struct = new ArrayList<Object>();
-        if (i == 0) {
-          struct.add(null);
-        } else {
-          struct.add(String.valueOf((r.nextDouble() - 0.5) * 1000));
-        }
-        structs[i] = struct;
-      }
-      sort(structs);
-      // Null should be smaller than any other value, so put a null at the front
-      // end
-      // to test whether that is held.
-      ((List) structs[0]).set(0, null);
-      ddl = "struct test { string hello}";
-      System.out.println("Testing " + ddl);
-      testTBinarySortableProtocol(structs, ddl, true);
-      testTBinarySortableProtocol(structs, ddl, false);
-
-      // Test string + double
-      for (int i = 0; i < num; i++) {
-        ArrayList<Object> struct = new ArrayList<Object>();
-        if (i % 9 == 0) {
-          struct.add(null);
-        } else {
-          struct.add("str" + (i / 5));
-        }
-        if (i % 7 == 0) {
-          struct.add(null);
-        } else {
-          struct.add(Double.valueOf((r.nextDouble() - 0.5) * 10));
-        }
-        structs[i] = struct;
-      }
-      sort(structs);
-      // Null should be smaller than any other value, so put a null at the front
-      // end
-      // to test whether that is held.
-      ((List) structs[0]).set(0, null);
-      ddl = "struct test { string hello, double another}";
-      System.out.println("Testing " + ddl);
-      testTBinarySortableProtocol(structs, ddl, true);
-      testTBinarySortableProtocol(structs, ddl, false);
-
-      System.out.println("Test testTBinarySortableProtocol passed!");
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-  }
-
-  @Test
-  public void testConfigurableTCTLSeparated() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = new ArrayList<String>();
-      bye.add("firstString");
-      bye.add("secondString");
-      LinkedHashMap<String, Integer> another = new LinkedHashMap<String, Integer>();
-      another.put("firstKey", 1);
-      another.put("secondKey", 2);
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(Integer.valueOf(234));
-      struct.add(bye);
-      struct.add(another);
-
-      Properties schema = new Properties();
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-
-      schema.setProperty(serdeConstants.FIELD_DELIM, "9");
-      schema.setProperty(serdeConstants.COLLECTION_DELIM, "1");
-      schema.setProperty(serdeConstants.LINE_DELIM, "2");
-      schema.setProperty(serdeConstants.MAPKEY_DELIM, "4");
-
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      TCTLSeparatedProtocol prot = (TCTLSeparatedProtocol) serde.oprot_;
-      assertTrue(prot.getPrimarySeparator().equals("\u0009"));
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      hexString(bytes);
-
-      String compare = "234" + "\u0009" + "firstString" + "\u0001"
-          + "secondString" + "\u0009" + "firstKey" + "\u0004" + "1" + "\u0001"
-          + "secondKey" + "\u0004" + "2";
-
-      System.out.println("bytes in text ="
-          + new String(bytes.get(), 0, bytes.getSize()) + ">");
-      System.out.println("compare to    =" + compare + ">");
-
-      assertTrue(compare.equals(new String(bytes.get(), 0, bytes.getSize())));
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      System.out.println("o class = " + o.getClass());
-      List<?> olist = (List<?>) o;
-      System.out.println("o size = " + olist.size());
-      System.out.println("o[0] class = " + olist.get(0).getClass());
-      System.out.println("o[1] class = " + olist.get(1).getClass());
-      System.out.println("o[2] class = " + olist.get(2).getClass());
-      System.out.println("o = " + o);
-
-      assertEquals(o, struct);
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  /**
-   * Tests a single null list within a struct with return nulls on.
-   */
-
-  @Test
-  public void testNulls1() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = null;
-      HashMap<String, Integer> another = new HashMap<String, Integer>();
-      another.put("firstKey", 1);
-      another.put("secondKey", 2);
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(Integer.valueOf(234));
-      struct.add(bye);
-      struct.add(another);
-
-      Properties schema = new Properties();
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-      schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "true");
-
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      hexString(bytes);
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      assertEquals(struct, o);
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  /**
-   * Tests all elements of a struct being null with return nulls on.
-   */
-
-  @Test
-  public void testNulls2() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = null;
-      HashMap<String, Integer> another = null;
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(null);
-      struct.add(bye);
-      struct.add(another);
-
-      Properties schema = new Properties();
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-      schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "true");
-
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      hexString(bytes);
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      List<?> olist = (List<?>) o;
-
-      assertTrue(olist.size() == 3);
-      assertEquals(null, olist.get(0));
-      assertEquals(null, olist.get(1));
-      assertEquals(null, olist.get(2));
-
-      // assertEquals(o, struct); Cannot do this because types of null lists are
-      // wrong.
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  /**
-   * Tests map and list being empty with return nulls on.
-   */
-
-  @Test
-  public void testNulls3() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = new ArrayList<String>();
-      HashMap<String, Integer> another = null;
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(null);
-      struct.add(bye);
-      struct.add(another);
-
-      Properties schema = new Properties();
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-
-      schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "true");
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      hexString(bytes);
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      List<?> olist = (List<?>) o;
-
-      assertTrue(olist.size() == 3);
-      assertEquals(null, olist.get(0));
-      assertEquals(0, ((List<?>) olist.get(1)).size());
-      assertEquals(null, olist.get(2));
-
-      // assertEquals(o, struct); Cannot do this because types of null lists are
-      // wrong.
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  /**
-   * Tests map and list null/empty with return nulls *off*.
-   */
-
-  @Test
-  public void testNulls4() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = new ArrayList<String>();
-      HashMap<String, Integer> another = null;
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(null);
-      struct.add(bye);
-      struct.add(another);
-
-      Properties schema = new Properties();
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-
-      schema.setProperty(TCTLSeparatedProtocol.ReturnNullsKey, "false");
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      hexString(bytes);
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      List<?> olist = (List<?>) o;
-
-      assertTrue(olist.size() == 3);
-      assertEquals(new Integer(0), (Integer) olist.get(0));
-      List<?> num1 = (List<?>) olist.get(1);
-      assertTrue(num1.size() == 0);
-      Map<?, ?> num2 = (Map<?, ?>) olist.get(2);
-      assertTrue(num2.size() == 0);
-
-      // assertEquals(o, struct); Cannot do this because types of null lists are
-      // wrong.
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  /**
-   * Tests map and list null/empty with return nulls *off*.
-   */
-
-  @Test
-  public void testStructsinStructs() throws Throwable {
-    try {
-
-      Properties schema = new Properties();
-      // schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-      // org.apache.thrift.protocol.TJSONProtocol.class.getName());
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.thrift.protocol.TBinaryProtocol.class.getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema.setProperty(
-          serdeConstants.SERIALIZATION_DDL,
-      "struct inner { i32 field1, string field2 },struct  test {inner foo,  i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-
-      //
-      // construct object of above type
-      //
-
-      // construct the inner struct
-      ArrayList<Object> innerStruct = new ArrayList<Object>();
-      innerStruct.add(new Integer(22));
-      innerStruct.add(new String("hello world"));
-
-      // construct outer struct
-      ArrayList<String> bye = new ArrayList<String>();
-      bye.add("firstString");
-      bye.add("secondString");
-      HashMap<String, Integer> another = new HashMap<String, Integer>();
-      another.put("firstKey", 1);
-      another.put("secondKey", 2);
-
-      ArrayList<Object> struct = new ArrayList<Object>();
-
-      struct.add(innerStruct);
-      struct.add(Integer.valueOf(234));
-      struct.add(bye);
-      struct.add(another);
-
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      List<?> olist = (List<?>) o;
-
-      assertEquals(4, olist.size());
-      assertEquals(innerStruct, olist.get(0));
-      assertEquals(new Integer(234), olist.get(1));
-      assertEquals(bye, olist.get(2));
-      assertEquals(another, olist.get(3));
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-  @Test
-  public void testSkip() throws Throwable {
-    try {
-
-      // Try to construct an object
-      ArrayList<String> bye = new ArrayList<String>();
-      bye.add("firstString");
-      bye.add("secondString");
-      LinkedHashMap<String, Integer> another = new LinkedHashMap<String, Integer>();
-      another.put("firstKey", 1);
-      another.put("secondKey", 2);
-      ArrayList<Object> struct = new ArrayList<Object>();
-      struct.add(Integer.valueOf(234));
-      struct.add(bye);
-      struct.add(another);
-
-      Properties schema = new Properties();
-      schema.setProperty(serdeConstants.SERIALIZATION_FORMAT,
-          org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol.class
-          .getName());
-      schema.setProperty(
-          org.apache.hadoop.hive.metastore.api.hive_metastoreConstants.META_TABLE_NAME,
-          "test");
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, list<string> bye, map<string,i32> another}");
-      schema.setProperty(serdeConstants.SERIALIZATION_LIB, new DynamicSerDe()
-          .getClass().toString());
-
-      schema.setProperty(serdeConstants.FIELD_DELIM, "9");
-      schema.setProperty(serdeConstants.COLLECTION_DELIM, "1");
-      schema.setProperty(serdeConstants.LINE_DELIM, "2");
-      schema.setProperty(serdeConstants.MAPKEY_DELIM, "4");
-
-      DynamicSerDe serde = new DynamicSerDe();
-      serde.initialize(new Configuration(), schema);
-
-      TCTLSeparatedProtocol prot = (TCTLSeparatedProtocol) serde.oprot_;
-      assertTrue(prot.getPrimarySeparator().equals("\u0009"));
-
-      ObjectInspector oi = serde.getObjectInspector();
-
-      // Try to serialize
-      BytesWritable bytes = (BytesWritable) serde.serialize(struct, oi);
-
-      hexString(bytes);
-
-      String compare = "234" + "\u0009" + "firstString" + "\u0001"
-          + "secondString" + "\u0009" + "firstKey" + "\u0004" + "1" + "\u0001"
-          + "secondKey" + "\u0004" + "2";
-
-      System.out.println("bytes in text ="
-          + new String(bytes.get(), 0, bytes.getSize()) + ">");
-      System.out.println("compare to    =" + compare + ">");
-
-      assertTrue(compare.equals(new String(bytes.get(), 0, bytes.getSize())));
-
-      schema
-          .setProperty(serdeConstants.SERIALIZATION_DDL,
-          "struct test { i32 hello, skip list<string> bye, map<string,i32> another}");
-
-      serde.initialize(new Configuration(), schema);
-
-      // Try to deserialize
-      Object o = serde.deserialize(bytes);
-      System.out.println("o class = " + o.getClass());
-      List<?> olist = (List<?>) o;
-      System.out.println("o size = " + olist.size());
-      System.out.println("o = " + o);
-
-      assertEquals(null, olist.get(1));
-
-      // set the skipped field to null
-      struct.set(1, null);
-
-      assertEquals(o, struct);
-
-    } catch (Throwable e) {
-      e.printStackTrace();
-      throw e;
-    }
-
-  }
-
-}
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/replace/AlterTableReplaceColumnsOperation.java b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/replace/AlterTableReplaceColumnsOperation.java
index e46d2b5..c7ec1fa 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/replace/AlterTableReplaceColumnsOperation.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/ddl/table/column/replace/AlterTableReplaceColumnsOperation.java
@@ -34,7 +34,6 @@ import org.apache.hadoop.hive.ql.metadata.Partition;
 import org.apache.hadoop.hive.ql.metadata.Table;
 import org.apache.hadoop.hive.serde2.MetadataTypedColumnsetSerDe;
 import org.apache.hadoop.hive.serde2.columnar.ColumnarSerDe;
-import org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe;
 import org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe;
 
 import com.google.common.collect.ImmutableSet;
@@ -49,7 +48,7 @@ public class AlterTableReplaceColumnsOperation extends AbstractAlterTableOperati
 
   private static final Set<String> VALID_SERIALIZATION_LIBS = ImmutableSet.of(
       MetadataTypedColumnsetSerDe.class.getName(), LazySimpleSerDe.class.getName(), ColumnarSerDe.class.getName(),
-      DynamicSerDe.class.getName(), ParquetHiveSerDe.class.getName(), OrcSerde.class.getName());
+      ParquetHiveSerDe.class.getName(), OrcSerde.class.getName());
 
   @Override
   protected void doAlteration(Table table, Partition partition) throws HiveException {
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
index 964c98d..5321188 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/ReduceSinkOperator.java
@@ -94,7 +94,6 @@ public class ReduceSinkOperator extends TerminalOperator<ReduceSinkDesc>
    * Evaluators for bucketing columns. This is used to compute bucket number.
    */
   protected transient ExprNodeEvaluator[] bucketEval = null;
-  // TODO: we use MetadataTypedColumnsetSerDe for now, till DynamicSerDe is ready
   protected transient Serializer keySerializer;
   protected transient boolean keyIsText;
   protected transient Serializer valueSerializer;
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecReducer.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecReducer.java
index af462eb..022ae9a 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecReducer.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/mr/ExecReducer.java
@@ -68,7 +68,6 @@ public class ExecReducer extends MapReduceBase implements Reducer {
   private final Object[] valueObject = new Object[Byte.MAX_VALUE];
   private final List<Object> row = new ArrayList<Object>(Utilities.reduceFieldNameList.size());
 
-  // TODO: move to DynamicSerDe when it's ready
   private Deserializer inputKeyDeserializer;
   private JobConf jc;
   private OutputCollector<?, ?> oc;
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkReduceRecordHandler.java b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkReduceRecordHandler.java
index 86f3aaa..454196f 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkReduceRecordHandler.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/exec/spark/SparkReduceRecordHandler.java
@@ -78,7 +78,6 @@ public class SparkReduceRecordHandler extends SparkRecordHandler {
   private final Object[] valueObject = new Object[Byte.MAX_VALUE];
   private final List<Object> row = new ArrayList<Object>(Utilities.reduceFieldNameList.size());
 
-  // TODO: move to DynamicSerDe when it's ready
   private Deserializer inputKeyDeserializer;
   private Operator<?> reducer;
   private boolean isTagged = false;
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveBinaryOutputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveBinaryOutputFormat.java
index 86793d8..747c446 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveBinaryOutputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveBinaryOutputFormat.java
@@ -73,7 +73,7 @@ public class HiveBinaryOutputFormat<K extends WritableComparable, V extends Writ
           Text tr = (Text) r;
           outStream.write(tr.getBytes(), 0, tr.getLength());
         } else {
-          // DynamicSerDe always writes out BytesWritable
+          // Binary SerDes always write out BytesWritable
           BytesWritable bw = (BytesWritable) r;
           outStream.write(bw.get(), 0, bw.getSize());
         }
diff --git a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java
index 9d05510..4b393b5 100644
--- a/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java
+++ b/ql/src/java/org/apache/hadoop/hive/ql/io/HiveIgnoreKeyTextOutputFormat.java
@@ -87,7 +87,7 @@ public class HiveIgnoreKeyTextOutputFormat<K extends WritableComparable, V exten
           outStream.write(tr.getBytes(), 0, tr.getLength());
           outStream.write(finalRowSeparator);
         } else {
-          // DynamicSerDe always writes out BytesWritable
+          // Binary SerDes always write out BytesWritable
           BytesWritable bw = (BytesWritable) r;
           outStream.write(bw.get(), 0, bw.getSize());
           outStream.write(finalRowSeparator);
diff --git a/ql/src/test/queries/clientpositive/implicit_cast1.q b/ql/src/test/queries/clientpositive/implicit_cast1.q
deleted file mode 100644
index 37fb856..0000000
--- a/ql/src/test/queries/clientpositive/implicit_cast1.q
+++ /dev/null
@@ -1,13 +0,0 @@
-CREATE TABLE implicit_test1(a BIGINT, b STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES('serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol') STORED AS TEXTFILE;
-
-EXPLAIN
-SELECT implicit_test1.*
-FROM implicit_test1
-WHERE implicit_test1.a <> 0;
-
-SELECT implicit_test1.*
-FROM implicit_test1
-WHERE implicit_test1.a <> 0;
-
-
-
diff --git a/ql/src/test/queries/clientpositive/input19.q b/ql/src/test/queries/clientpositive/input19.q
deleted file mode 100644
index 33ff8b7..0000000
--- a/ql/src/test/queries/clientpositive/input19.q
+++ /dev/null
@@ -1,5 +0,0 @@
-
-create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES (  'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol',  'quote.delim'= '(\"|\\[|\\])',  'field.delim'=' ',  'serialization.null.format'='-'  ) STORED AS TEXTFILE;
-LOAD DATA LOCAL INPATH '../../data/files/apache.access.log' INTO TABLE apachelog;
-SELECT a.* FROM apachelog a;
-
diff --git a/ql/src/test/results/clientpositive/llap/implicit_cast1.q.out b/ql/src/test/results/clientpositive/llap/implicit_cast1.q.out
deleted file mode 100644
index 0bb9926..0000000
--- a/ql/src/test/results/clientpositive/llap/implicit_cast1.q.out
+++ /dev/null
@@ -1,52 +0,0 @@
-PREHOOK: query: CREATE TABLE implicit_test1(a BIGINT, b STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES('serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol') STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@implicit_test1
-POSTHOOK: query: CREATE TABLE implicit_test1(a BIGINT, b STRING) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES('serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol') STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@implicit_test1
-PREHOOK: query: EXPLAIN
-SELECT implicit_test1.*
-FROM implicit_test1
-WHERE implicit_test1.a <> 0
-PREHOOK: type: QUERY
-PREHOOK: Input: default@implicit_test1
-#### A masked pattern was here ####
-POSTHOOK: query: EXPLAIN
-SELECT implicit_test1.*
-FROM implicit_test1
-WHERE implicit_test1.a <> 0
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@implicit_test1
-#### A masked pattern was here ####
-STAGE DEPENDENCIES:
-  Stage-0 is a root stage
-
-STAGE PLANS:
-  Stage: Stage-0
-    Fetch Operator
-      limit: -1
-      Processor Tree:
-        TableScan
-          alias: implicit_test1
-          filterExpr: (a <> 0L) (type: boolean)
-          Filter Operator
-            predicate: (a <> 0L) (type: boolean)
-            Select Operator
-              expressions: a (type: bigint), b (type: string)
-              outputColumnNames: _col0, _col1
-              ListSink
-
-PREHOOK: query: SELECT implicit_test1.*
-FROM implicit_test1
-WHERE implicit_test1.a <> 0
-PREHOOK: type: QUERY
-PREHOOK: Input: default@implicit_test1
-#### A masked pattern was here ####
-POSTHOOK: query: SELECT implicit_test1.*
-FROM implicit_test1
-WHERE implicit_test1.a <> 0
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@implicit_test1
-#### A masked pattern was here ####
diff --git a/ql/src/test/results/clientpositive/llap/input19.q.out b/ql/src/test/results/clientpositive/llap/input19.q.out
deleted file mode 100644
index 754c891..0000000
--- a/ql/src/test/results/clientpositive/llap/input19.q.out
+++ /dev/null
@@ -1,25 +0,0 @@
-PREHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES (  'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol',  'quote.delim'= '(\"|\\[|\\])',  'field.delim'=' ',  'serialization.null.format'='-'  ) STORED AS TEXTFILE
-PREHOOK: type: CREATETABLE
-PREHOOK: Output: database:default
-PREHOOK: Output: default@apachelog
-POSTHOOK: query: create table apachelog(ipaddress STRING,identd STRING,user_name STRING,finishtime STRING,requestline string,returncode INT,size INT) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.dynamic_type.DynamicSerDe' WITH SERDEPROPERTIES (  'serialization.format'= 'org.apache.hadoop.hive.serde2.thrift.TCTLSeparatedProtocol',  'quote.delim'= '(\"|\\[|\\])',  'field.delim'=' ',  'serialization.null.format'='-'  ) STORED AS TEXTFILE
-POSTHOOK: type: CREATETABLE
-POSTHOOK: Output: database:default
-POSTHOOK: Output: default@apachelog
-PREHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/apache.access.log' INTO TABLE apachelog
-PREHOOK: type: LOAD
-#### A masked pattern was here ####
-PREHOOK: Output: default@apachelog
-POSTHOOK: query: LOAD DATA LOCAL INPATH '../../data/files/apache.access.log' INTO TABLE apachelog
-POSTHOOK: type: LOAD
-#### A masked pattern was here ####
-POSTHOOK: Output: default@apachelog
-PREHOOK: query: SELECT a.* FROM apachelog a
-PREHOOK: type: QUERY
-PREHOOK: Input: default@apachelog
-#### A masked pattern was here ####
-POSTHOOK: query: SELECT a.* FROM apachelog a
-POSTHOOK: type: QUERY
-POSTHOOK: Input: default@apachelog
-#### A masked pattern was here ####
-127.0.0.1	NULL	frank	10/Oct/2000:13:55:36 -0700	GET /apache_pb.gif HTTP/1.0	200	2326
diff --git a/serde/README.txt b/serde/README.txt
index a1830e8..5f86168 100644
--- a/serde/README.txt
+++ b/serde/README.txt
@@ -10,8 +10,6 @@ through "CREATE TABLE" statement:
 * FileFormat: the data has to be in Text or SequenceFile.
 * Format of the row:
   * If the data is in delimited format, use MetadataTypedColumnsetSerDe
-  * If the data is in delimited format and has more than 1 levels of delimitor,
-    use DynamicSerDe with TCTLSeparatedProtocol
   * If the data is a serialized thrift object, use ThriftSerDe
 
 The steps to load the data:
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java
deleted file mode 100644
index a6ed8b8..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDe.java
+++ /dev/null
@@ -1,317 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.io.ByteArrayInputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Properties;
-
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.apache.hadoop.conf.Configuration;
-import org.apache.hadoop.hive.serde.serdeConstants;
-import org.apache.hadoop.hive.serde2.AbstractSerDe;
-import org.apache.hadoop.hive.serde2.ByteStream;
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.SerDeSpec;
-import org.apache.hadoop.hive.serde2.SerDeStats;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorFactory;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.PrimitiveObjectInspectorUtils.PrimitiveTypeEntry;
-import org.apache.hadoop.hive.serde2.thrift.ConfigurableTProtocol;
-import org.apache.hadoop.hive.serde2.thrift.TReflectionUtils;
-import org.apache.hadoop.io.BytesWritable;
-import org.apache.hadoop.io.Text;
-import org.apache.hadoop.io.Writable;
-import org.apache.hadoop.util.StringUtils;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TProtocolFactory;
-import org.apache.thrift.transport.TIOStreamTransport;
-
-/**
- * DynamicSerDe.
- *
- */
-@SerDeSpec(schemaProps = {
-    serdeConstants.SERIALIZATION_DDL, serdeConstants.SERIALIZATION_FORMAT,
-    DynamicSerDe.META_TABLE_NAME})
-public class DynamicSerDe extends AbstractSerDe {
-
-  public static final Logger LOG = LoggerFactory.getLogger(DynamicSerDe.class.getName());
-
-  private String type_name;
-  private DynamicSerDeStructBase bt;
-
-  public static final String META_TABLE_NAME = "name";
-
-  private transient thrift_grammar parse_tree;
-  protected transient ByteStream.Input bis_;
-  protected transient ByteStream.Output bos_;
-
-  /**
-   * protocols are protected in case any of their properties need to be queried
-   * from another class in this package. For TCTLSeparatedProtocol for example,
-   * may want to query the separators.
-   */
-  protected transient TProtocol oprot_;
-  protected transient TProtocol iprot_;
-
-  TIOStreamTransport tios;
-
-  private static HashMap<String, String> typeToThriftTypeMap;
-  static {
-    typeToThriftTypeMap = new HashMap<>();
-    typeToThriftTypeMap.put(serdeConstants.BOOLEAN_TYPE_NAME, "bool");
-    typeToThriftTypeMap.put(serdeConstants.TINYINT_TYPE_NAME, "byte");
-    typeToThriftTypeMap.put(serdeConstants.SMALLINT_TYPE_NAME, "i16");
-    typeToThriftTypeMap.put(serdeConstants.INT_TYPE_NAME, "i32");
-    typeToThriftTypeMap.put(serdeConstants.BIGINT_TYPE_NAME, "i64");
-    typeToThriftTypeMap.put(serdeConstants.DOUBLE_TYPE_NAME, "double");
-    typeToThriftTypeMap.put(serdeConstants.FLOAT_TYPE_NAME, "float");
-    typeToThriftTypeMap.put(serdeConstants.LIST_TYPE_NAME, "list");
-    typeToThriftTypeMap.put(serdeConstants.MAP_TYPE_NAME, "map");
-    typeToThriftTypeMap.put(serdeConstants.STRING_TYPE_NAME, "string");
-    typeToThriftTypeMap.put(serdeConstants.BINARY_TYPE_NAME, "binary");
-    // These 4 types are not supported yet.
-    // We should define a complex type date in thrift that contains a single int
-    // member, and DynamicSerDe
-    // should convert it to date type at runtime.
-    typeToThriftTypeMap.put(serdeConstants.DATE_TYPE_NAME, "date");
-    typeToThriftTypeMap.put(serdeConstants.DATETIME_TYPE_NAME, "datetime");
-    typeToThriftTypeMap.put(serdeConstants.TIMESTAMP_TYPE_NAME, "timestamp");
-    typeToThriftTypeMap.put(serdeConstants.DECIMAL_TYPE_NAME, "decimal");
-  }
-
-  /**
-   * Convert type to ThriftType. We do that by tokenizing the type and convert
-   * each token.
-   */
-  private String typeToThriftType(String type) {
-    StringBuilder thriftType = new StringBuilder();
-    int last = 0;
-    boolean lastAlphaDigit = Character.isLetterOrDigit(type.charAt(last));
-    for (int i = 1; i <= type.length(); i++) {
-      if (i == type.length()
-          || Character.isLetterOrDigit(type.charAt(i)) != lastAlphaDigit) {
-        String token = type.substring(last, i);
-        last = i;
-        String thriftToken = typeToThriftTypeMap.get(token);
-        thriftType.append(thriftToken == null ? token : thriftToken);
-        lastAlphaDigit = !lastAlphaDigit;
-      }
-    }
-    return thriftType.toString();
-  }
-
-  /**
-   * Generate Thrift DDL from column props.
-   */
-  private String getDDLFrom(String structName,
-    String cols, String types) throws SerDeException{
-    String[] colNames = cols.split(",");
-    String[] colTypes = types.split(":");
-
-    if (colNames.length != colTypes.length) {
-      throw new SerDeException("colnames : " + cols + " types: "+types);
-    }
-    StringBuilder ddl = new StringBuilder();
-    ddl.append("struct ");
-    ddl.append(structName);
-    ddl.append(" { ");
-    boolean first = true;
-    for (int i=0; i < colNames.length; i++) {
-      if (first) {
-        first = false;
-      } else {
-        ddl.append(", ");
-      }
-      ddl.append(typeToThriftType(colTypes[i]));
-      ddl.append(' ');
-      ddl.append(colNames[i]);
-    }
-    ddl.append("}");
-
-    LOG.trace("DDL: {}", ddl);
-    return ddl.toString();
-  }
-
-  @Override
-  public void initialize(Configuration job, Properties tbl) throws SerDeException {
-    try {
-
-      String ddl = tbl.getProperty(serdeConstants.SERIALIZATION_DDL);
-      // type_name used to be tbl.getProperty(META_TABLE_NAME).
-      // However, now the value is DBName.TableName. To make it backward compatible,
-      // we take the TableName part as type_name.
-      //
-      String tableName = tbl.getProperty(META_TABLE_NAME);
-      int index = tableName.indexOf('.');
-      if (index != -1) {
-        type_name = tableName.substring(index + 1, tableName.length());
-      } else {
-        type_name = tableName;
-      }
-
-      if (null == ddl) {
-        ddl = getDDLFrom(type_name, tbl.getProperty(serdeConstants.LIST_COLUMNS), tbl.getProperty(serdeConstants.LIST_COLUMN_TYPES));
-
-      }
-      String protoName = tbl.getProperty(serdeConstants.SERIALIZATION_FORMAT);
-
-      if (protoName == null) {
-        protoName = "org.apache.thrift.protocol.TBinaryProtocol";
-      }
-      // For backward compatibility
-      protoName = protoName.replace("com.facebook.thrift.protocol",
-          "org.apache.thrift.protocol");
-      TProtocolFactory protFactory = TReflectionUtils
-          .getProtocolFactoryByName(protoName);
-      bos_ = new ByteStream.Output();
-      bis_ = new ByteStream.Input();
-      tios = new TIOStreamTransport(bis_, bos_);
-
-      oprot_ = protFactory.getProtocol(tios);
-      iprot_ = protFactory.getProtocol(tios);
-
-      /**
-       * initialize the protocols
-       */
-
-      if (oprot_ instanceof org.apache.hadoop.hive.serde2.thrift.ConfigurableTProtocol) {
-        ((ConfigurableTProtocol) oprot_).initialize(job, tbl);
-      }
-
-      if (iprot_ instanceof org.apache.hadoop.hive.serde2.thrift.ConfigurableTProtocol) {
-        ((ConfigurableTProtocol) iprot_).initialize(job, tbl);
-      }
-
-      // in theory the include path should come from the configuration
-      List<String> include_path = new ArrayList<String>();
-      include_path.add(".");
-      LOG.debug("ddl=" + ddl);
-      parse_tree = new thrift_grammar(new ByteArrayInputStream(ddl.getBytes()),
-          include_path, false);
-      parse_tree.Start();
-
-      bt = (DynamicSerDeStructBase) parse_tree.types.get(type_name);
-
-      if (bt == null) {
-        bt = (DynamicSerDeStructBase) parse_tree.tables.get(type_name);
-      }
-
-      if (bt == null) {
-        throw new SerDeException("Could not lookup table type " + type_name
-            + " in this ddl: " + ddl);
-      }
-
-      bt.initialize();
-    } catch (Exception e) {
-      System.err.println(StringUtils.stringifyException(e));
-      throw new SerDeException(e);
-    }
-  }
-
-  Object deserializeReuse = null;
-
-  @Override
-  public Object deserialize(Writable field) throws SerDeException {
-    try {
-      if (field instanceof Text) {
-        Text b = (Text) field;
-        bis_.reset(b.getBytes(), b.getLength());
-      } else {
-        BytesWritable b = (BytesWritable) field;
-        bis_.reset(b.getBytes(), b.getLength());
-      }
-      deserializeReuse = bt.deserialize(deserializeReuse, iprot_);
-      return deserializeReuse;
-    } catch (Exception e) {
-      throw new SerDeException(e);
-    }
-  }
-
-  public static ObjectInspector dynamicSerDeStructBaseToObjectInspector(
-      DynamicSerDeTypeBase bt) throws SerDeException {
-    if (bt.isList()) {
-      return ObjectInspectorFactory
-          .getStandardListObjectInspector(dynamicSerDeStructBaseToObjectInspector(((DynamicSerDeTypeList) bt)
-              .getElementType()));
-    } else if (bt.isMap()) {
-      DynamicSerDeTypeMap btMap = (DynamicSerDeTypeMap) bt;
-      return ObjectInspectorFactory.getStandardMapObjectInspector(
-          dynamicSerDeStructBaseToObjectInspector(btMap.getKeyType()),
-          dynamicSerDeStructBaseToObjectInspector(btMap.getValueType()));
-    } else if (bt.isPrimitive()) {
-      PrimitiveTypeEntry pte = PrimitiveObjectInspectorUtils
-          .getTypeEntryFromPrimitiveJavaClass(bt.getRealType());
-      return PrimitiveObjectInspectorFactory.getPrimitiveJavaObjectInspector(pte.primitiveCategory);
-    } else {
-      // Must be a struct
-      DynamicSerDeStructBase btStruct = (DynamicSerDeStructBase) bt;
-      DynamicSerDeFieldList fieldList = btStruct.getFieldList();
-      DynamicSerDeField[] fields = fieldList.getChildren();
-      ArrayList<String> fieldNames = new ArrayList<String>(fields.length);
-      ArrayList<ObjectInspector> fieldObjectInspectors = new ArrayList<ObjectInspector>(
-          fields.length);
-      for (DynamicSerDeField field : fields) {
-        fieldNames.add(field.name);
-        fieldObjectInspectors.add(dynamicSerDeStructBaseToObjectInspector(field
-            .getFieldType().getMyType()));
-      }
-      return ObjectInspectorFactory.getStandardStructObjectInspector(
-          fieldNames, fieldObjectInspectors);
-    }
-  }
-
-  @Override
-  public ObjectInspector getObjectInspector() throws SerDeException {
-    return dynamicSerDeStructBaseToObjectInspector(bt);
-  }
-
-  @Override
-  public Class<? extends Writable> getSerializedClass() {
-    return BytesWritable.class;
-  }
-
-  BytesWritable ret = new BytesWritable();
-
-  @Override
-  public Writable serialize(Object obj, ObjectInspector objInspector) throws SerDeException {
-    try {
-      bos_.reset();
-      bt.serialize(obj, objInspector, oprot_);
-      oprot_.getTransport().flush();
-    } catch (Exception e) {
-      throw new SerDeException(e);
-    }
-    ret.set(bos_.getData(), 0, bos_.getLength());
-    return ret;
-  }
-
-
-  @Override
-  public SerDeStats getSerDeStats() {
-    // no support for statistics
-    return null;
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeAsync.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeAsync.java
deleted file mode 100644
index 4065174..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeAsync.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeAsync.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeAsync extends SimpleNode {
-  public DynamicSerDeAsync(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeAsync(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeCommaOrSemicolon.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeCommaOrSemicolon.java
deleted file mode 100644
index e1e974f..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeCommaOrSemicolon.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeCommaOrSemicolon.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeCommaOrSemicolon extends SimpleNode {
-  public DynamicSerDeCommaOrSemicolon(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeCommaOrSemicolon(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConst.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConst.java
deleted file mode 100644
index 5fbfc7c..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConst.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeConst.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeConst extends SimpleNode {
-  public DynamicSerDeConst(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeConst(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstList.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstList.java
deleted file mode 100644
index d629609..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstList.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeConstList.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeConstList extends SimpleNode {
-  public DynamicSerDeConstList(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeConstList(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstListContents.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstListContents.java
deleted file mode 100644
index dccbb8c..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstListContents.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeConstListContents.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeConstListContents extends SimpleNode {
-  public DynamicSerDeConstListContents(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeConstListContents(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstMap.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstMap.java
deleted file mode 100644
index dc0fbe1..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstMap.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeConstMap.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeConstMap extends SimpleNode {
-  public DynamicSerDeConstMap(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeConstMap(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstMapContents.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstMapContents.java
deleted file mode 100644
index 11d114a..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstMapContents.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeConstMapContents.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeConstMapContents extends SimpleNode {
-  public DynamicSerDeConstMapContents(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeConstMapContents(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstValue.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstValue.java
deleted file mode 100644
index f28c8e4..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeConstValue.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeConstValue.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeConstValue extends SimpleNode {
-  public DynamicSerDeConstValue(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeConstValue(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeDefinition.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeDefinition.java
deleted file mode 100644
index fc795b9..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeDefinition.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeDefinition.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeDefinition extends SimpleNode {
-  public DynamicSerDeDefinition(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeDefinition(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeDefinitionType.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeDefinitionType.java
deleted file mode 100644
index 4fd73ef..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeDefinitionType.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeDefinitionType.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeDefinitionType extends SimpleNode {
-  public DynamicSerDeDefinitionType(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeDefinitionType(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnum.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnum.java
deleted file mode 100644
index e2e8cd9..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnum.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeEnum.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeEnum extends SimpleNode {
-  public DynamicSerDeEnum(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeEnum(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnumDef.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnumDef.java
deleted file mode 100644
index 38f9524..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnumDef.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeEnumDef.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeEnumDef extends SimpleNode {
-  public DynamicSerDeEnumDef(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeEnumDef(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnumDefList.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnumDefList.java
deleted file mode 100644
index 2b05e42..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeEnumDefList.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeEnumDefList.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeEnumDefList extends SimpleNode {
-  public DynamicSerDeEnumDefList(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeEnumDefList(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeExtends.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeExtends.java
deleted file mode 100644
index 3c05ccb..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeExtends.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeExtends.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeExtends extends SimpleNode {
-  public DynamicSerDeExtends(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeExtends(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeField.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeField.java
deleted file mode 100644
index a3c67e0..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeField.java
+++ /dev/null
@@ -1,51 +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.hadoop.hive.serde2.dynamic_type;
-
-/**
- * DynamicSerDeField.
- *
- */
-public class DynamicSerDeField extends DynamicSerDeSimpleNode {
-
-  // production is:
-  // [this.fieldid :] Requiredness() FieldType() this.name FieldValue()
-  // [CommaOrSemicolon()]
-
-  private static final int FD_REQUIREDNESS = 0;
-  private static final int FD_FIELD_TYPE = 1;
-
-  public boolean isSkippable() {
-    return ((DynamicSerDeFieldRequiredness) jjtGetChild(FD_REQUIREDNESS))
-        .getRequiredness() == DynamicSerDeFieldRequiredness.RequirednessTypes.Skippable;
-  }
-
-  public DynamicSerDeFieldType getFieldType() {
-    return (DynamicSerDeFieldType) jjtGetChild(FD_FIELD_TYPE);
-  }
-
-  public DynamicSerDeField(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeField(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldList.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldList.java
deleted file mode 100644
index 6f334ab..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldList.java
+++ /dev/null
@@ -1,290 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.StructField;
-import org.apache.hadoop.hive.serde2.objectinspector.StructObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TField;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TProtocolUtil;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeFieldList.
- *
- */
-public class DynamicSerDeFieldList extends DynamicSerDeSimpleNode implements
-    Serializable {
-
-  // private void writeObject(ObjectOutputStream out) throws IOException {
-  // out.writeObject(types_by_column_name);
-  // out.writeObject(ordered_types);
-  // }
-
-  // production: Field()*
-
-  // mapping of the fieldid to the field
-  private Map<Integer, DynamicSerDeTypeBase> types_by_id = null;
-  private Map<String, DynamicSerDeTypeBase> types_by_column_name = null;
-  private DynamicSerDeTypeBase[] ordered_types = null;
-
-  private Map<String, Integer> ordered_column_id_by_name = null;
-
-  public DynamicSerDeFieldList(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeFieldList(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  private DynamicSerDeField getField(int i) {
-    return (DynamicSerDeField) jjtGetChild(i);
-  }
-
-  public final DynamicSerDeField[] getChildren() {
-    int size = jjtGetNumChildren();
-    DynamicSerDeField[] result = new DynamicSerDeField[size];
-    for (int i = 0; i < size; i++) {
-      result[i] = (DynamicSerDeField) jjtGetChild(i);
-    }
-    return result;
-  }
-
-  private int getNumFields() {
-    return jjtGetNumChildren();
-  }
-
-  public void initialize() {
-    if (types_by_id == null) {
-      // multiple means of lookup
-      types_by_id = new HashMap<Integer, DynamicSerDeTypeBase>();
-      types_by_column_name = new HashMap<String, DynamicSerDeTypeBase>();
-      ordered_types = new DynamicSerDeTypeBase[jjtGetNumChildren()];
-      ordered_column_id_by_name = new HashMap<String, Integer>();
-
-      // put them in and also roll them up while we're at it
-      // a Field contains a FieldType which in turn contains a type
-      for (int i = 0; i < jjtGetNumChildren(); i++) {
-        DynamicSerDeField mt = getField(i);
-        DynamicSerDeTypeBase type = mt.getFieldType().getMyType();
-        // types get initialized in case they need to setup any
-        // internal data structures - e.g., DynamicSerDeStructBase
-        type.initialize();
-        type.fieldid = mt.fieldid;
-        type.name = mt.name;
-
-        types_by_id.put(Integer.valueOf(mt.fieldid), type);
-        types_by_column_name.put(mt.name, type);
-        ordered_types[i] = type;
-        ordered_column_id_by_name.put(mt.name, i);
-      }
-    }
-  }
-
-  private DynamicSerDeTypeBase getFieldByFieldId(int i) {
-    return types_by_id.get(i);
-  }
-
-  protected DynamicSerDeTypeBase getFieldByName(String fieldname) {
-    return types_by_column_name.get(fieldname);
-  }
-
-  /**
-   * Indicates whether fields can be out of order or missing. i.e., is it really
-   * real thrift serialization. This is used by dynamicserde to do some
-   * optimizations if it knows all the fields exist and are required and are
-   * serialized in order. For now, those optimizations are only done for
-   * DynamicSerDe serialized data so always set to false for now.
-   */
-  protected boolean isRealThrift = false;
-
-  protected boolean[] fieldsPresent;
-
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    ArrayList<Object> struct = null;
-
-    if (reuse == null) {
-      struct = new ArrayList<Object>(getNumFields());
-      for (DynamicSerDeTypeBase orderedType : ordered_types) {
-        struct.add(null);
-      }
-    } else {
-      struct = (ArrayList<Object>) reuse;
-      assert (struct.size() == ordered_types.length);
-    }
-
-    boolean fastSkips = iprot instanceof org.apache.hadoop.hive.serde2.thrift.SkippableTProtocol;
-
-    // may need to strip away the STOP marker when in thrift mode
-    boolean stopSeen = false;
-
-    if (fieldsPresent == null) {
-      fieldsPresent = new boolean[ordered_types.length];
-    }
-    Arrays.fill(fieldsPresent, false);
-
-    // Read the fields.
-    for (int i = 0; i < getNumFields(); i++) {
-      DynamicSerDeTypeBase mt = null;
-      TField field = null;
-
-      if (!isRealThrift && getField(i).isSkippable()) {
-        // PRE - all the fields are required and serialized in order - is
-        // !isRealThrift
-        mt = ordered_types[i];
-        if (fastSkips) {
-          ((org.apache.hadoop.hive.serde2.thrift.SkippableTProtocol) iprot)
-              .skip(mt.getType());
-        } else {
-          TProtocolUtil.skip(iprot, mt.getType());
-        }
-        struct.set(i, null);
-        continue;
-      }
-      if (thrift_mode) {
-        field = iprot.readFieldBegin();
-
-        if (field.type >= 0) {
-          if (field.type == TType.STOP) {
-            stopSeen = true;
-            break;
-          }
-          mt = getFieldByFieldId(field.id);
-          if (mt == null) {
-            System.err.println("ERROR for fieldid: " + field.id
-                + " system has no knowledge of this field which is of type : "
-                + field.type);
-            TProtocolUtil.skip(iprot, field.type);
-            continue;
-          }
-        }
-      }
-
-      // field.type < 0 means that this is a faked Thrift field, e.g.,
-      // TControlSeparatedProtocol, which does not
-      // serialize the field id in the stream. As a result, the only way to get
-      // the field id is to fall back to
-      // the position "i".
-      // The intention of this hack (field.type < 0) is to make
-      // TControlSeparatedProtocol a real Thrift prototype,
-      // but there are a lot additional work to do to fulfill that, and that
-      // protocol inherently does not support
-      // versioning (adding/deleting fields).
-      int orderedId = -1;
-      if (!thrift_mode || field.type < 0) {
-        mt = ordered_types[i];
-        // We don't need to lookup order_column_id_by_name because we know it
-        // must be "i".
-        orderedId = i;
-      } else {
-        // Set the correct position
-        orderedId = ordered_column_id_by_name.get(mt.name);
-      }
-      struct.set(orderedId, mt.deserialize(struct.get(orderedId), iprot));
-      if (thrift_mode) {
-        iprot.readFieldEnd();
-      }
-      fieldsPresent[orderedId] = true;
-    }
-
-    for (int i = 0; i < ordered_types.length; i++) {
-      if (!fieldsPresent[i]) {
-        struct.set(i, null);
-      }
-    }
-
-    if (thrift_mode && !stopSeen) {
-      // strip off the STOP marker, which may be left if all the fields were in
-      // the serialization
-      iprot.readFieldBegin();
-    }
-    return struct;
-  }
-
-  TField field = new TField();
-
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    // Assuming the ObjectInspector represents exactly the same type as this
-    // struct.
-    // This assumption should be checked during query compile time.
-    assert (oi instanceof StructObjectInspector);
-    StructObjectInspector soi = (StructObjectInspector) oi;
-
-    boolean writeNulls = oprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol;
-
-    // For every field
-    List<? extends StructField> fields = soi.getAllStructFieldRefs();
-    if (fields.size() != ordered_types.length) {
-      throw new SerDeException("Trying to serialize " + fields.size()
-          + " fields into a struct with " + ordered_types.length + " object="
-          + o + " objectinspector=" + oi.getTypeName());
-    }
-    for (int i = 0; i < fields.size(); i++) {
-      Object f = soi.getStructFieldData(o, fields.get(i));
-      DynamicSerDeTypeBase mt = ordered_types[i];
-
-      if (f == null && !writeNulls) {
-        continue;
-      }
-
-      if (thrift_mode) {
-        field = new TField(mt.name, mt.getType(), (short) mt.fieldid);
-        oprot.writeFieldBegin(field);
-      }
-
-      if (f == null) {
-        ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) oprot)
-            .writeNull();
-      } else {
-        mt.serialize(f, fields.get(i).getFieldObjectInspector(), oprot);
-      }
-      if (thrift_mode) {
-        oprot.writeFieldEnd();
-      }
-    }
-    if (thrift_mode) {
-      oprot.writeFieldStop();
-    }
-  }
-
-  @Override
-  public String toString() {
-    StringBuilder result = new StringBuilder();
-    String prefix = "";
-    for (DynamicSerDeField t : getChildren()) {
-      result.append(prefix + t.fieldid + ":"
-          + t.getFieldType().getMyType().toString() + " " + t.name);
-      prefix = ",";
-    }
-    return result.toString();
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldRequiredness.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldRequiredness.java
deleted file mode 100644
index 4e49285..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldRequiredness.java
+++ /dev/null
@@ -1,55 +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.hadoop.hive.serde2.dynamic_type;
-
-/**
- * DynamicSerDeFieldRequiredness.
- *
- */
-public class DynamicSerDeFieldRequiredness extends SimpleNode {
-  /**
-   * RequirednessTypes.
-   *
-   */
-  public enum RequirednessTypes {
-    Required, Skippable, Optional,
-  };
-
-  /**
-   * Is this a required, skippable or optional field. Used by DynamicSerDe for
-   * optimizations.
-   */
-  protected RequirednessTypes requiredness;
-
-  /**
-   * Get the requiredness attribute of this field.
-   */
-  public RequirednessTypes getRequiredness() {
-    return requiredness;
-  }
-
-  public DynamicSerDeFieldRequiredness(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeFieldRequiredness(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldType.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldType.java
deleted file mode 100644
index 0b970fa..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldType.java
+++ /dev/null
@@ -1,48 +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.hadoop.hive.serde2.dynamic_type;
-
-/**
- * DynamicSerDeFieldType.
- * Basically just a container for the real type so more like a proxy.
- *
- */
-public class DynamicSerDeFieldType extends DynamicSerDeSimpleNode {
-
-  // production: this.name | BaseType() | MapType() | SetType() | ListType()
-
-  private static final int FD_FIELD_TYPE = 0;
-
-  public DynamicSerDeFieldType(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeFieldType(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  protected DynamicSerDeTypeBase getMyType() {
-    // bugbug, need to deal with a named type here - i.e., look it up and proxy
-    // to it
-    // should raise an exception if this is a typedef since won't be any
-    // children
-    // and thus we can quickly find this comment and limitation.
-    return (DynamicSerDeTypeBase) jjtGetChild(FD_FIELD_TYPE);
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldValue.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldValue.java
deleted file mode 100644
index 8107b09..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFieldValue.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeFieldValue.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeFieldValue extends SimpleNode {
-  public DynamicSerDeFieldValue(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeFieldValue(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFlagArgs.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFlagArgs.java
deleted file mode 100644
index 99d1f1f..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFlagArgs.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeFlagArgs.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeFlagArgs extends SimpleNode {
-  public DynamicSerDeFlagArgs(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeFlagArgs(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunction.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunction.java
deleted file mode 100644
index 140d668..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunction.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 org.apache.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.thrift.protocol.TMessageType;
-
-/**
- * DynamicSerDeFunction.
- *
- */
-public class DynamicSerDeFunction extends DynamicSerDeStructBase {
-
-  // production is: Async() FunctionType() NAME FieldList() Throws()
-  // [CommaOrSemicolon]
-
-  private static final int FD_FIELD_LIST = 2;
-
-  public DynamicSerDeFunction(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeFunction(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public DynamicSerDeFieldList getFieldList() {
-    return (DynamicSerDeFieldList) jjtGetChild(FD_FIELD_LIST);
-  }
-
-  @Override
-  public String toString() {
-    String result = "function " + name + " (";
-    result += getFieldList().toString();
-    result += ")";
-    return result;
-  }
-
-  @Override
-  public byte getType() {
-    return TMessageType.CALL;
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunctionType.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunctionType.java
deleted file mode 100644
index 67c7044..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeFunctionType.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeFunctionType.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeFunctionType extends SimpleNode {
-  public DynamicSerDeFunctionType(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeFunctionType(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeHeader.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeHeader.java
deleted file mode 100644
index 01baf43..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeHeader.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeHeader.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeHeader extends SimpleNode {
-  public DynamicSerDeHeader(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeHeader(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeHeaderList.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeHeaderList.java
deleted file mode 100644
index 86e9fb0..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeHeaderList.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeHeaderList.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeHeaderList extends SimpleNode {
-  public DynamicSerDeHeaderList(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeHeaderList(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeInclude.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeInclude.java
deleted file mode 100644
index d6af585..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeInclude.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeInclude.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeInclude extends SimpleNode {
-  public DynamicSerDeInclude(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeInclude(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeNamespace.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeNamespace.java
deleted file mode 100644
index d4d49bd..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeNamespace.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeNamespace.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeNamespace extends SimpleNode {
-  public DynamicSerDeNamespace(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeNamespace(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenum.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenum.java
deleted file mode 100644
index bd1d86a..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenum.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeSenum.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeSenum extends SimpleNode {
-  public DynamicSerDeSenum(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeSenum(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenumDef.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenumDef.java
deleted file mode 100644
index aba00b5..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenumDef.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeSenumDef.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeSenumDef extends SimpleNode {
-  public DynamicSerDeSenumDef(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeSenumDef(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenumDefList.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenumDefList.java
deleted file mode 100644
index 87e5bae..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSenumDefList.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeSenumDefList.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeSenumDefList extends SimpleNode {
-  public DynamicSerDeSenumDefList(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeSenumDefList(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeService.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeService.java
deleted file mode 100644
index 961d4f9..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeService.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeService.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeService extends SimpleNode {
-  public DynamicSerDeService(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeService(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSimpleNode.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSimpleNode.java
deleted file mode 100644
index 9d7c2b2..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeSimpleNode.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 org.apache.hadoop.hive.serde2.dynamic_type;
-
-/**
- * DynamicSerDeSimpleNode.
- *
- */
-public class DynamicSerDeSimpleNode extends SimpleNode {
-  protected static final boolean thrift_mode = true;
-
-  public DynamicSerDeSimpleNode(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeSimpleNode(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  protected int fieldid;
-  protected String name;
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStart.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStart.java
deleted file mode 100644
index 71ce1c2..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStart.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeStart.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeStart extends SimpleNode {
-  public DynamicSerDeStart(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeStart(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStruct.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStruct.java
deleted file mode 100644
index 53eda3d..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStruct.java
+++ /dev/null
@@ -1,59 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeStruct.
- *
- */
-public class DynamicSerDeStruct extends DynamicSerDeStructBase {
-
-  // production is: struct this.name { FieldList() }
-
-  private static final int FD_FIELD_LIST = 0;
-
-  public DynamicSerDeStruct(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeStruct(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    String result = "struct " + name + "(";
-    result += getFieldList().toString();
-    result += ")";
-    return result;
-  }
-
-  @Override
-  public DynamicSerDeFieldList getFieldList() {
-    return (DynamicSerDeFieldList) jjtGetChild(FD_FIELD_LIST);
-  }
-
-  @Override
-  public byte getType() {
-    return TType.STRUCT;
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStructBase.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStructBase.java
deleted file mode 100644
index 51f33f1..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeStructBase.java
+++ /dev/null
@@ -1,106 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.io.Serializable;
-import java.util.List;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TStruct;
-
-/**
- * DynamicSerDeStructBase.
- *
- */
-public abstract class DynamicSerDeStructBase extends DynamicSerDeTypeBase
-    implements Serializable {
-
-  DynamicSerDeFieldList fieldList;
-
-  public DynamicSerDeStructBase(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeStructBase(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  public abstract DynamicSerDeFieldList getFieldList();
-
-  @Override
-  public void initialize() {
-    fieldList = getFieldList();
-    fieldList.initialize();
-  }
-
-  @Override
-  public boolean isPrimitive() {
-    return false;
-  }
-
-  @Override
-  public Class getRealType() {
-    return List.class;
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    if (thrift_mode) {
-      iprot.readStructBegin();
-    }
-
-    Object o = fieldList.deserialize(reuse, iprot);
-
-    if (thrift_mode) {
-      iprot.readStructEnd();
-    }
-    return o;
-  }
-
-  /**
-   * serialize
-   * 
-   * The way to serialize a Thrift "table" which in thrift land is really a
-   * function and thus this class's name.
-   * 
-   * @param o
-   *          - this list should be in the order of the function's params for
-   *          now. If we wanted to remove this requirement, we'd need to make it
-   *          a List&lt;Pair&lt;String, Object&gt;&gt; with the String being the field name.
-   * 
-   */
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    if (thrift_mode) {
-      oprot.writeStructBegin(new TStruct(name));
-    }
-
-    fieldList.serialize(o, oi, oprot);
-
-    if (thrift_mode) {
-      oprot.writeStructEnd();
-    }
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeThrows.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeThrows.java
deleted file mode 100644
index 0e39a2d..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeThrows.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeThrows.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeThrows extends SimpleNode {
-  public DynamicSerDeThrows(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeThrows(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBase.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBase.java
deleted file mode 100644
index 8c1ca1b..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBase.java
+++ /dev/null
@@ -1,85 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.io.Serializable;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-
-/**
- * DynamicSerDeTypeBase.
- *
- */
-public abstract class DynamicSerDeTypeBase extends DynamicSerDeSimpleNode
-    implements Serializable {
-  private static final long serialVersionUID = 1L;
-
-  public DynamicSerDeTypeBase(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeBase(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  public void initialize() {
-    // for base type, do nothing. Other types, like structs may initialize
-    // internal data
-    // structures.
-  }
-
-  public Class getRealType() throws SerDeException {
-    throw new SerDeException("Not implemented in base");
-  }
-
-  public Object get(Object obj) {
-    throw new RuntimeException("Not implemented in base");
-  }
-
-  public abstract Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException;
-
-  public abstract void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException;
-
-  @Override
-  public String toString() {
-    return "BAD";
-  }
-
-  public byte getType() {
-    return -1;
-  }
-
-  public boolean isPrimitive() {
-    return true;
-  }
-
-  public boolean isList() {
-    return false;
-  }
-
-  public boolean isMap() {
-    return false;
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBool.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBool.java
deleted file mode 100644
index a34c70e..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeBool.java
+++ /dev/null
@@ -1,83 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.BooleanObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeBool.
- *
- */
-public class DynamicSerDeTypeBool extends DynamicSerDeTypeBase {
-
-  // production is: bool
-
-  public DynamicSerDeTypeBool(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeBool(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    return "bool";
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    boolean val = iprot.readBool();
-    if (val == false
-        && iprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol
-        && ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) iprot)
-        .lastPrimitiveWasNull()) {
-      return null;
-    }
-    return Boolean.valueOf(val);
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    BooleanObjectInspector poi = (BooleanObjectInspector) oi;
-    oprot.writeBool(poi.get(o));
-  }
-
-  @Override
-  public byte getType() {
-    return TType.BOOL;
-  }
-
-  @Override
-  public Class getRealType() {
-    return java.lang.Boolean.class;
-  }
-
-  public Boolean getRealTypeInstance() {
-    return Boolean.FALSE;
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeByte.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeByte.java
deleted file mode 100644
index 911471a..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeByte.java
+++ /dev/null
@@ -1,78 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.ByteObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeByte.
- *
- */
-public class DynamicSerDeTypeByte extends DynamicSerDeTypeBase {
-
-  // production is: byte
-
-  public DynamicSerDeTypeByte(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeByte(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    return "byte";
-  }
-
-  public Byte deserialize(TProtocol iprot) throws SerDeException, TException,
-      IllegalAccessException {
-    byte val = iprot.readByte();
-    if (val == 0
-        && iprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol
-        && ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) iprot)
-        .lastPrimitiveWasNull()) {
-      return null;
-    }
-    return Byte.valueOf(val);
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    return deserialize(iprot);
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    ByteObjectInspector poi = (ByteObjectInspector) oi;
-    oprot.writeByte(poi.get(o));
-  }
-
-  @Override
-  public byte getType() {
-    return TType.BYTE;
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDefinition.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDefinition.java
deleted file mode 100644
index 20aab74..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDefinition.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeTypeDefinition.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeTypeDefinition extends SimpleNode {
-  public DynamicSerDeTypeDefinition(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeTypeDefinition(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDouble.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDouble.java
deleted file mode 100644
index ff2f5d9..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeDouble.java
+++ /dev/null
@@ -1,82 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.DoubleObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeDouble.
- *
- */
-public class DynamicSerDeTypeDouble extends DynamicSerDeTypeBase {
-
-  // production is: double
-
-  public DynamicSerDeTypeDouble(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeDouble(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    return "double";
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    double val = iprot.readDouble();
-    if (val == 0
-        && iprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol
-        && ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) iprot)
-        .lastPrimitiveWasNull()) {
-      return null;
-    }
-    return Double.valueOf(val);
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    DoubleObjectInspector poi = (DoubleObjectInspector) oi;
-    oprot.writeDouble(poi.get(o));
-  }
-
-  @Override
-  public byte getType() {
-    return TType.DOUBLE;
-  }
-
-  @Override
-  public Class getRealType() {
-    return java.lang.Double.class;
-  }
-
-  public Double getRealTypeInstance() {
-    return Double.valueOf(0);
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java
deleted file mode 100644
index 7ae1e03..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeList.java
+++ /dev/null
@@ -1,153 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.hadoop.hive.serde.serdeConstants;
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TList;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeList.
- *
- */
-public class DynamicSerDeTypeList extends DynamicSerDeTypeBase {
-
-  @Override
-  public boolean isPrimitive() {
-    return false;
-  }
-
-  @Override
-  public boolean isList() {
-    return true;
-  }
-
-  // production is: list<FieldType()>
-
-  private static final int FD_TYPE = 0;
-
-  @Override
-  public Class getRealType() {
-    return java.util.ArrayList.class;
-  }
-
-  public DynamicSerDeTypeList(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeList(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  public DynamicSerDeTypeBase getElementType() {
-    return ((DynamicSerDeFieldType) jjtGetChild(FD_TYPE)).getMyType();
-  }
-
-  @Override
-  public String toString() {
-    return serdeConstants.LIST_TYPE_NAME + "<" + getElementType().toString() + ">";
-  }
-
-  @Override
-  public ArrayList<Object> deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    TList thelist = iprot.readListBegin();
-    if (thelist == null) {
-      return null;
-    }
-
-    ArrayList<Object> deserializeReuse;
-    if (reuse != null) {
-      deserializeReuse = (ArrayList<Object>) reuse;
-      // Trim to the size needed
-      while (deserializeReuse.size() > thelist.size) {
-        deserializeReuse.remove(deserializeReuse.size() - 1);
-      }
-    } else {
-      deserializeReuse = new ArrayList<Object>();
-    }
-    deserializeReuse.ensureCapacity(thelist.size);
-    for (int i = 0; i < thelist.size; i++) {
-      if (i + 1 > deserializeReuse.size()) {
-        deserializeReuse.add(getElementType().deserialize(null, iprot));
-      } else {
-        deserializeReuse.set(i, getElementType().deserialize(
-            deserializeReuse.get(i), iprot));
-      }
-    }
-    // in theory, the below call isn't needed in non thrift_mode, but let's not
-    // get too crazy
-    iprot.readListEnd();
-    return deserializeReuse;
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    ListObjectInspector loi = (ListObjectInspector) oi;
-    ObjectInspector elementObjectInspector = loi
-        .getListElementObjectInspector();
-    DynamicSerDeTypeBase mt = getElementType();
-
-    WriteNullsProtocol nullProtocol =
-        (oprot instanceof WriteNullsProtocol) ? (WriteNullsProtocol) oprot : null;
-
-    if (o instanceof List) {
-      List<?> list = (List<?>) o;
-      oprot.writeListBegin(new TList(mt.getType(), list.size()));
-      for (Object element : list) {
-        if (element == null) {
-          assert (nullProtocol != null);
-          nullProtocol.writeNull();
-        } else {
-          mt.serialize(element, elementObjectInspector, oprot);
-        }
-      }
-    } else {
-      Object[] list = (Object[]) o;
-      oprot.writeListBegin(new TList(mt.getType(), list.length));
-      for (Object element : list) {
-        if (element == null && nullProtocol != null) {
-          assert (nullProtocol != null);
-          nullProtocol.writeNull();
-        } else {
-          mt.serialize(element, elementObjectInspector, oprot);
-        }
-      }
-    }
-    // in theory, the below call isn't needed in non thrift_mode, but let's not
-    // get too crazy
-    oprot.writeListEnd();
-  }
-
-  @Override
-  public byte getType() {
-    return TType.LIST;
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeMap.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeMap.java
deleted file mode 100644
index 07f7105..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeMap.java
+++ /dev/null
@@ -1,161 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.util.Collections;
-import java.util.LinkedHashMap;
-import java.util.Map;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.MapObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TMap;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeMap.
- *
- */
-public class DynamicSerDeTypeMap extends DynamicSerDeTypeBase {
-
-  @Override
-  public boolean isPrimitive() {
-    return false;
-  }
-
-  @Override
-  public boolean isMap() {
-    return true;
-  }
-
-  // production is: Map<FieldType(),FieldType()>
-
-  private final byte FD_KEYTYPE = 0;
-  private final byte FD_VALUETYPE = 1;
-
-  // returns Map<?,?>
-  @Override
-  public Class getRealType() {
-    try {
-      Class c = getKeyType().getRealType();
-      Class c2 = getValueType().getRealType();
-      Object o = c.newInstance();
-      Object o2 = c2.newInstance();
-      Map<?, ?> l = Collections.singletonMap(o, o2);
-      return l.getClass();
-    } catch (Exception e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public DynamicSerDeTypeMap(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeMap(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  public DynamicSerDeTypeBase getKeyType() {
-    return ((DynamicSerDeFieldType) jjtGetChild(FD_KEYTYPE)).getMyType();
-  }
-
-  public DynamicSerDeTypeBase getValueType() {
-    return ((DynamicSerDeFieldType) jjtGetChild(FD_VALUETYPE)).getMyType();
-  }
-
-  @Override
-  public String toString() {
-    return "map<" + getKeyType().toString() + "," + getValueType().toString()
-        + ">";
-  }
-
-  @Override
-  public Map<Object, Object> deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    Map<Object, Object> deserializeReuse;
-    if (reuse != null && reuse.getClass() == LinkedHashMap.class) {
-      deserializeReuse = (Map<Object, Object>) reuse;
-      deserializeReuse.clear();
-    } else {
-      deserializeReuse = new LinkedHashMap<Object, Object>();
-    }
-    TMap themap = iprot.readMapBegin();
-    if (themap == null) {
-      return null;
-    }
-    // themap might be reused by the Protocol.
-    int mapSize = themap.size;
-    for (int i = 0; i < mapSize; i++) {
-      Object key = getKeyType().deserialize(null, iprot);
-      Object value = getValueType().deserialize(null, iprot);
-      deserializeReuse.put(key, value);
-    }
-
-    // in theory, the below call isn't needed in non thrift_mode, but let's not
-    // get too crazy
-    iprot.readMapEnd();
-    return deserializeReuse;
-  }
-
-  TMap serializeMap = null;
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    DynamicSerDeTypeBase keyType = getKeyType();
-    DynamicSerDeTypeBase valueType = getValueType();
-
-    WriteNullsProtocol nullProtocol =
-        (oprot instanceof WriteNullsProtocol) ? (WriteNullsProtocol) oprot : null;
-
-    assert (oi.getCategory() == ObjectInspector.Category.MAP);
-    MapObjectInspector moi = (MapObjectInspector) oi;
-    ObjectInspector koi = moi.getMapKeyObjectInspector();
-    ObjectInspector voi = moi.getMapValueObjectInspector();
-
-    Map<?, ?> map = moi.getMap(o);
-    serializeMap = new TMap(keyType.getType(), valueType.getType(), map.size());
-    oprot.writeMapBegin(serializeMap);
-
-    for (Object element : map.entrySet()) {
-      Map.Entry it = (Map.Entry) element;
-      Object key = it.getKey();
-      Object value = it.getValue();
-      keyType.serialize(key, koi, oprot);
-      if (value == null) {
-        assert (nullProtocol != null);
-        nullProtocol.writeNull();
-      } else {
-        valueType.serialize(value, voi, oprot);
-      }
-    }
-    // in theory, the below call isn't needed in non thrift_mode, but let's not
-    // get too crazy
-    oprot.writeMapEnd();
-  }
-
-  @Override
-  public byte getType() {
-    return TType.MAP;
-  }
-};
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeSet.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeSet.java
deleted file mode 100644
index 58346d7..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeSet.java
+++ /dev/null
@@ -1,128 +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.hadoop.hive.serde2.dynamic_type;
-
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ListObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TSet;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeSet.
- *
- */
-public class DynamicSerDeTypeSet extends DynamicSerDeTypeBase {
-
-  // production is: set<FieldType()>
-
-  private static final int FD_TYPE = 0;
-
-  public DynamicSerDeTypeSet(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeSet(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  // returns Set<?>
-  @Override
-  public Class getRealType() {
-    try {
-      Class c = getElementType().getRealType();
-      Object o = c.newInstance();
-      Set<?> l = Collections.singleton(o);
-      return l.getClass();
-    } catch (Exception e) {
-      throw new RuntimeException(e);
-    }
-  }
-
-  public DynamicSerDeTypeBase getElementType() {
-    return ((DynamicSerDeFieldType) jjtGetChild(FD_TYPE)).getMyType();
-  }
-
-  @Override
-  public String toString() {
-    return "set<" + getElementType().toString() + ">";
-  }
-
-  @Override
-  public byte getType() {
-    return TType.SET;
-  }
-
-  /**
-   * NOTE: Set is not supported by Hive yet.
-   */
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    TSet theset = iprot.readSetBegin();
-    if (theset == null) {
-      return null;
-    }
-    Set<Object> result;
-    if (reuse != null) {
-      result = (Set<Object>) reuse;
-      result.clear();
-    } else {
-      result = new HashSet<Object>();
-    }
-    for (int i = 0; i < theset.size; i++) {
-      Object elem = getElementType().deserialize(null, iprot);
-      result.add(elem);
-    }
-    // in theory, the below call isn't needed in non thrift_mode, but let's not
-    // get too crazy
-    iprot.readSetEnd();
-    return result;
-  }
-
-  /**
-   * NOTE: Set is not supported by Hive yet. The code uses ListObjectInspector
-   * right now. We need to change it to SetObjectInspector when that is done.
-   */
-  TSet tset = null;
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-
-    ListObjectInspector loi = (ListObjectInspector) oi;
-
-    Set<Object> set = (Set<Object>) o;
-    DynamicSerDeTypeBase mt = getElementType();
-    tset = new TSet(mt.getType(), set.size());
-    oprot.writeSetBegin(tset);
-    for (Object element : set) {
-      mt.serialize(element, loi.getListElementObjectInspector(), oprot);
-    }
-    // in theory, the below call isn't needed in non thrift_mode, but let's not
-    // get too crazy
-    oprot.writeSetEnd();
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeString.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeString.java
deleted file mode 100644
index 39387a5..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypeString.java
+++ /dev/null
@@ -1,81 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.StringObjectInspector;
-import org.apache.hadoop.hive.serde2.thrift.WriteTextProtocol;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypeString.
- *
- */
-public class DynamicSerDeTypeString extends DynamicSerDeTypeBase {
-
-  // production is: string
-
-  public DynamicSerDeTypeString(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypeString(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public Class getRealType() {
-    return java.lang.String.class;
-  }
-
-  @Override
-  public String toString() {
-    return "string";
-  }
-
-  public String deserialize(TProtocol iprot) throws SerDeException, TException,
-      IllegalAccessException {
-    return iprot.readString();
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    return iprot.readString();
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    StringObjectInspector poi = (StringObjectInspector) oi;
-    if (oprot instanceof WriteTextProtocol) {
-      ((WriteTextProtocol) oprot).writeText(poi.getPrimitiveWritableObject(o));
-    } else {
-      oprot.writeString(poi.getPrimitiveJavaObject(o));
-    }
-  }
-
-  @Override
-  public byte getType() {
-    return TType.STRING;
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypedef.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypedef.java
deleted file mode 100644
index 2bf5acc..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypedef.java
+++ /dev/null
@@ -1,79 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-
-/**
- * DynamicSerDeTypedef.
- *
- */
-public class DynamicSerDeTypedef extends DynamicSerDeTypeBase {
-
-  // production is: typedef DefinitionType() this.name
-
-  private static final int FD_DEFINITION_TYPE = 0;
-
-  public DynamicSerDeTypedef(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypedef(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  private DynamicSerDeSimpleNode getDefinitionType() {
-    return (DynamicSerDeSimpleNode) jjtGetChild(FD_DEFINITION_TYPE);
-  }
-
-  public DynamicSerDeTypeBase getMyType() {
-    DynamicSerDeSimpleNode child = getDefinitionType();
-    DynamicSerDeTypeBase ret = (DynamicSerDeTypeBase) child.jjtGetChild(0);
-    return ret;
-  }
-
-  @Override
-  public String toString() {
-    String result = "typedef " + name + "(";
-    result += getDefinitionType().toString();
-    result += ")";
-    return result;
-  }
-
-  @Override
-  public byte getType() {
-    throw new RuntimeException("not implemented");
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    throw new RuntimeException("not implemented");
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    throw new RuntimeException("not implemented");
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei16.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei16.java
deleted file mode 100644
index bce5ce1..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei16.java
+++ /dev/null
@@ -1,78 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.ShortObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypei16.
- *
- */
-public class DynamicSerDeTypei16 extends DynamicSerDeTypeBase {
-
-  @Override
-  public Class getRealType() {
-    return Integer.valueOf(2).getClass();
-  }
-
-  // production is: i16
-
-  public DynamicSerDeTypei16(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypei16(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    return "i16";
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    int val = iprot.readI16();
-    if (val == 0
-        && iprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol
-        && ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) iprot)
-        .lastPrimitiveWasNull()) {
-      return null;
-    }
-    return Integer.valueOf(val);
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    ShortObjectInspector poi = (ShortObjectInspector) oi;
-    oprot.writeI16(poi.get(o));
-  }
-
-  @Override
-  public byte getType() {
-    return TType.I16;
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei32.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei32.java
deleted file mode 100644
index f573942..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei32.java
+++ /dev/null
@@ -1,82 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.IntObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypei32.
- *
- */
-public class DynamicSerDeTypei32 extends DynamicSerDeTypeBase {
-
-  // production is: i32
-
-  public DynamicSerDeTypei32(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypei32(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    return "i32";
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    int val = iprot.readI32();
-    if (val == 0
-        && iprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol
-        && ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) iprot)
-        .lastPrimitiveWasNull()) {
-      return null;
-    }
-    return Integer.valueOf(val);
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    IntObjectInspector poi = (IntObjectInspector) oi;
-    oprot.writeI32(poi.get(o));
-  }
-
-  @Override
-  public Class getRealType() {
-    return java.lang.Integer.class;
-  }
-
-  public Integer getRealTypeInstance() {
-    return Integer.valueOf(0);
-  }
-
-  @Override
-  public byte getType() {
-    return TType.I32;
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei64.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei64.java
deleted file mode 100644
index e78ec88..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeTypei64.java
+++ /dev/null
@@ -1,78 +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.hadoop.hive.serde2.dynamic_type;
-
-import org.apache.hadoop.hive.serde2.SerDeException;
-import org.apache.hadoop.hive.serde2.objectinspector.ObjectInspector;
-import org.apache.hadoop.hive.serde2.objectinspector.primitive.LongObjectInspector;
-import org.apache.thrift.TException;
-import org.apache.thrift.protocol.TProtocol;
-import org.apache.thrift.protocol.TType;
-
-/**
- * DynamicSerDeTypei64.
- *
- */
-public class DynamicSerDeTypei64 extends DynamicSerDeTypeBase {
-
-  @Override
-  public Class getRealType() {
-    return Long.valueOf(0).getClass();
-  }
-
-  // production is: i64
-
-  public DynamicSerDeTypei64(int i) {
-    super(i);
-  }
-
-  public DynamicSerDeTypei64(thrift_grammar p, int i) {
-    super(p, i);
-  }
-
-  @Override
-  public String toString() {
-    return "i64";
-  }
-
-  @Override
-  public Object deserialize(Object reuse, TProtocol iprot)
-      throws SerDeException, TException, IllegalAccessException {
-    long val = iprot.readI64();
-    if (val == 0
-        && iprot instanceof org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol
-        && ((org.apache.hadoop.hive.serde2.thrift.WriteNullsProtocol) iprot)
-        .lastPrimitiveWasNull()) {
-      return null;
-    }
-    return Long.valueOf(val);
-  }
-
-  @Override
-  public void serialize(Object o, ObjectInspector oi, TProtocol oprot)
-      throws TException, SerDeException, NoSuchFieldException, IllegalAccessException {
-    LongObjectInspector poi = (LongObjectInspector) oi;
-    oprot.writeI64(poi.get(o));
-  }
-
-  @Override
-  public byte getType() {
-    return TType.I64;
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeUnflagArgs.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeUnflagArgs.java
deleted file mode 100644
index d45619b..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeUnflagArgs.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeUnflagArgs.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeUnflagArgs extends SimpleNode {
-  public DynamicSerDeUnflagArgs(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeUnflagArgs(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeXception.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeXception.java
deleted file mode 100644
index 3d7b08f..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/DynamicSerDeXception.java
+++ /dev/null
@@ -1,14 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. DynamicSerDeXception.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class DynamicSerDeXception extends SimpleNode {
-  public DynamicSerDeXception(int id) {
-    super(id);
-  }
-
-  public DynamicSerDeXception(thrift_grammar p, int id) {
-    super(p, id);
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/JJTthrift_grammarState.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/JJTthrift_grammarState.java
deleted file mode 100644
index 5b8b306..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/JJTthrift_grammarState.java
+++ /dev/null
@@ -1,131 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. JJTthrift_grammarState.java Version 4.1 */
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class JJTthrift_grammarState {
-  private final java.util.List nodes;
-  private final java.util.List marks;
-
-  private int sp; // number of nodes on stack
-  private int mk; // current mark
-  private boolean node_created;
-
-  public JJTthrift_grammarState() {
-    nodes = new java.util.ArrayList();
-    marks = new java.util.ArrayList();
-    sp = 0;
-    mk = 0;
-  }
-
-  /*
-   * Determines whether the current node was actually closed and pushed. This
-   * should only be called in the final user action of a node scope.
-   */
-  public boolean nodeCreated() {
-    return node_created;
-  }
-
-  /*
-   * Call this to reinitialize the node stack. It is called automatically by the
-   * parser's ReInit() method.
-   */
-  public void reset() {
-    nodes.clear();
-    marks.clear();
-    sp = 0;
-    mk = 0;
-  }
-
-  /*
-   * Returns the root node of the AST. It only makes sense to call this after a
-   * successful parse.
-   */
-  public Node rootNode() {
-    return (Node) nodes.get(0);
-  }
-
-  /* Pushes a node on to the stack. */
-  public void pushNode(Node n) {
-    nodes.add(n);
-    ++sp;
-  }
-
-  /*
-   * Returns the node on the top of the stack, and remove it from the stack.
-   */
-  public Node popNode() {
-    if (--sp < mk) {
-      mk = ((Integer) marks.remove(marks.size() - 1)).intValue();
-    }
-    return (Node) nodes.remove(nodes.size() - 1);
-  }
-
-  /* Returns the node currently on the top of the stack. */
-  public Node peekNode() {
-    return (Node) nodes.get(nodes.size() - 1);
-  }
-
-  /*
-   * Returns the number of children on the stack in the current node scope.
-   */
-  public int nodeArity() {
-    return sp - mk;
-  }
-
-  public void clearNodeScope(Node n) {
-    while (sp > mk) {
-      popNode();
-    }
-    mk = ((Integer) marks.remove(marks.size() - 1)).intValue();
-  }
-
-  public void openNodeScope(Node n) {
-    marks.add(new Integer(mk));
-    mk = sp;
-    n.jjtOpen();
-  }
-
-  /*
-   * A definite node is constructed from a specified number of children. That
-   * number of nodes are popped from the stack and made the children of the
-   * definite node. Then the definite node is pushed on to the stack.
-   */
-  public void closeNodeScope(Node n, int num) {
-    mk = ((Integer) marks.remove(marks.size() - 1)).intValue();
-    while (num-- > 0) {
-      Node c = popNode();
-      c.jjtSetParent(n);
-      n.jjtAddChild(c, num);
-    }
-    n.jjtClose();
-    pushNode(n);
-    node_created = true;
-  }
-
-  /*
-   * A conditional node is constructed if its condition is true. All the nodes
-   * that have been pushed since the node was opened are made children of the
-   * conditional node, which is then pushed on to the stack. If the condition is
-   * false the node is not constructed and they are left on the stack.
-   */
-  public void closeNodeScope(Node n, boolean condition) {
-    if (condition) {
-      int a = nodeArity();
-      mk = ((Integer) marks.remove(marks.size() - 1)).intValue();
-      while (a-- > 0) {
-        Node c = popNode();
-        c.jjtSetParent(n);
-        n.jjtAddChild(c, a);
-      }
-      n.jjtClose();
-      pushNode(n);
-      node_created = true;
-    } else {
-      mk = ((Integer) marks.remove(marks.size() - 1)).intValue();
-      node_created = false;
-    }
-  }
-}
-/*
- * JavaCC - OriginalChecksum=67039445e12d18e18e63124a33879cd3 (do not edit this
- * line)
- */
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/Node.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/Node.java
deleted file mode 100644
index 25fde85..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/Node.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. Node.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-/* All AST nodes must implement this interface.  It provides basic
- machinery for constructing the parent and child relationships
- between nodes. */
-
-public interface Node {
-
-  /**
-   * This method is called after the node has been made the current node. It
-   * indicates that child nodes can now be added to it.
-   */
-  public void jjtOpen();
-
-  /**
-   * This method is called after all the child nodes have been added.
-   */
-  public void jjtClose();
-
-  /**
-   * This pair of methods are used to inform the node of its parent.
-   */
-  public void jjtSetParent(Node n);
-
-  public Node jjtGetParent();
-
-  /**
-   * This method tells the node to add its argument to the node's list of
-   * children.
-   */
-  public void jjtAddChild(Node n, int i);
-
-  /**
-   * This method returns a child node. The children are numbered from zero, left
-   * to right.
-   */
-  public Node jjtGetChild(int i);
-
-  /** Return the number of children the node has. */
-  public int jjtGetNumChildren();
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/ParseException.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/ParseException.java
deleted file mode 100644
index 00424d3..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/ParseException.java
+++ /dev/null
@@ -1,185 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. ParseException.java Version 3.0 */
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-/**
- * This exception is thrown when parse errors are encountered. You can
- * explicitly create objects of this exception type by calling the method
- * generateParseException in the generated parser.
- * 
- * You can modify this class to customize your error reporting mechanisms so
- * long as you retain the public fields.
- */
-public class ParseException extends Exception {
-
-  /**
-   * This constructor is used by the method "generateParseException" in the
-   * generated parser. Calling this constructor generates a new object of this
-   * type with the fields "currentToken", "expectedTokenSequences", and
-   * "tokenImage" set. The boolean flag "specialConstructor" is also set to true
-   * to indicate that this constructor was used to create this object. This
-   * constructor calls its super class with the empty string to force the
-   * "toString" method of parent class "Throwable" to print the error message in
-   * the form: ParseException: &lt;result of getMessage&gt;
-   */
-  public ParseException(Token currentTokenVal,
-      int[][] expectedTokenSequencesVal, String[] tokenImageVal) {
-    super("");
-    specialConstructor = true;
-    currentToken = currentTokenVal;
-    expectedTokenSequences = expectedTokenSequencesVal;
-    tokenImage = tokenImageVal;
-  }
-
-  /**
-   * The following constructors are for use by you for whatever purpose you can
-   * think of. Constructing the exception in this manner makes the exception
-   * behave in the normal way - i.e., as documented in the class "Throwable".
-   * The fields "errorToken", "expectedTokenSequences", and "tokenImage" do not
-   * contain relevant information. The JavaCC generated code does not use these
-   * constructors.
-   */
-
-  public ParseException() {
-    super();
-    specialConstructor = false;
-  }
-
-  public ParseException(String message) {
-    super(message);
-    specialConstructor = false;
-  }
-
-  /**
-   * This variable determines which constructor was used to create this object
-   * and thereby affects the semantics of the "getMessage" method (see below).
-   */
-  protected boolean specialConstructor;
-
-  /**
-   * This is the last token that has been consumed successfully. If this object
-   * has been created due to a parse error, the token followng this token will
-   * (therefore) be the first error token.
-   */
-  public Token currentToken;
-
-  /**
-   * Each entry in this array is an array of integers. Each array of integers
-   * represents a sequence of tokens (by their ordinal values) that is expected
-   * at this point of the parse.
-   */
-  public int[][] expectedTokenSequences;
-
-  /**
-   * This is a reference to the "tokenImage" array of the generated parser
-   * within which the parse error occurred. This array is defined in the
-   * generated ...Constants interface.
-   */
-  public String[] tokenImage;
-
-  /**
-   * This method has the standard behavior when this object has been created
-   * using the standard constructors. Otherwise, it uses "currentToken" and
-   * "expectedTokenSequences" to generate a parse error message and returns it.
-   * If this object has been created due to a parse error, and you do not catch
-   * it (it gets thrown from the parser), then this method is called during the
-   * printing of the final stack trace, and hence the correct error message gets
-   * displayed.
-   */
-  @Override
-  public String getMessage() {
-    if (!specialConstructor) {
-      return super.getMessage();
-    }
-    StringBuilder expected = new StringBuilder();
-    int maxSize = 0;
-    for (int[] expectedTokenSequence : expectedTokenSequences) {
-      if (maxSize < expectedTokenSequence.length) {
-        maxSize = expectedTokenSequence.length;
-      }
-      for (int element : expectedTokenSequence) {
-        expected.append(tokenImage[element]).append(" ");
-      }
-      if (expectedTokenSequence[expectedTokenSequence.length - 1] != 0) {
-        expected.append("...");
-      }
-      expected.append(eol).append("    ");
-    }
-    String retval = "Encountered \"";
-    Token tok = currentToken.next;
-    for (int i = 0; i < maxSize; i++) {
-      if (i != 0) {
-        retval += " ";
-      }
-      if (tok.kind == 0) {
-        retval += tokenImage[0];
-        break;
-      }
-      retval += add_escapes(tok.image);
-      tok = tok.next;
-    }
-    retval += "\" at line " + currentToken.next.beginLine + ", column "
-        + currentToken.next.beginColumn;
-    retval += "." + eol;
-    if (expectedTokenSequences.length == 1) {
-      retval += "Was expecting:" + eol + "    ";
-    } else {
-      retval += "Was expecting one of:" + eol + "    ";
-    }
-    retval += expected.toString();
-    return retval;
-  }
-
-  /**
-   * The end of line string for this machine.
-   */
-  protected String eol = System.getProperty("line.separator", "\n");
-
-  /**
-   * Used to convert raw characters to their escaped version when these raw
-   * version cannot be used as part of an ASCII string literal.
-   */
-  protected String add_escapes(String str) {
-    StringBuilder retval = new StringBuilder();
-    char ch;
-    for (int i = 0; i < str.length(); i++) {
-      switch (str.charAt(i)) {
-      case 0:
-        continue;
-      case '\b':
-        retval.append("\\b");
-        continue;
-      case '\t':
-        retval.append("\\t");
-        continue;
-      case '\n':
-        retval.append("\\n");
-        continue;
-      case '\f':
-        retval.append("\\f");
-        continue;
-      case '\r':
-        retval.append("\\r");
-        continue;
-      case '\"':
-        retval.append("\\\"");
-        continue;
-      case '\'':
-        retval.append("\\\'");
-        continue;
-      case '\\':
-        retval.append("\\\\");
-        continue;
-      default:
-        if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-          String s = "0000" + Integer.toString(ch, 16);
-          retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-        } else {
-          retval.append(ch);
-        }
-        continue;
-      }
-    }
-    return retval.toString();
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/SimpleCharStream.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/SimpleCharStream.java
deleted file mode 100644
index 9717c61..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/SimpleCharStream.java
+++ /dev/null
@@ -1,417 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. SimpleCharStream.java Version 4.0 */
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-/**
- * An implementation of interface CharStream, where the stream is assumed to
- * contain only ASCII characters (without unicode processing).
- */
-
-public class SimpleCharStream {
-  public static final boolean staticFlag = false;
-  int bufsize;
-  int available;
-  int tokenBegin;
-  public int bufpos = -1;
-  protected int bufline[];
-  protected int bufcolumn[];
-
-  protected int column = 0;
-  protected int line = 1;
-
-  protected boolean prevCharIsCR = false;
-  protected boolean prevCharIsLF = false;
-
-  protected java.io.Reader inputStream;
-
-  protected char[] buffer;
-  protected int maxNextCharInd = 0;
-  protected int inBuf = 0;
-  protected int tabSize = 8;
-
-  protected void setTabSize(int i) {
-    tabSize = i;
-  }
-
-  protected int getTabSize(int i) {
-    return tabSize;
-  }
-
-  protected void ExpandBuff(boolean wrapAround) {
-    char[] newbuffer = new char[bufsize + 2048];
-    int newbufline[] = new int[bufsize + 2048];
-    int newbufcolumn[] = new int[bufsize + 2048];
-
-    try {
-      if (wrapAround) {
-        System
-            .arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-        System.arraycopy(buffer, 0, newbuffer, bufsize - tokenBegin, bufpos);
-        buffer = newbuffer;
-
-        System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize
-            - tokenBegin);
-        System.arraycopy(bufline, 0, newbufline, bufsize - tokenBegin, bufpos);
-        bufline = newbufline;
-
-        System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize
-            - tokenBegin);
-        System.arraycopy(bufcolumn, 0, newbufcolumn, bufsize - tokenBegin,
-            bufpos);
-        bufcolumn = newbufcolumn;
-
-        maxNextCharInd = (bufpos += (bufsize - tokenBegin));
-      } else {
-        System
-            .arraycopy(buffer, tokenBegin, newbuffer, 0, bufsize - tokenBegin);
-        buffer = newbuffer;
-
-        System.arraycopy(bufline, tokenBegin, newbufline, 0, bufsize
-            - tokenBegin);
-        bufline = newbufline;
-
-        System.arraycopy(bufcolumn, tokenBegin, newbufcolumn, 0, bufsize
-            - tokenBegin);
-        bufcolumn = newbufcolumn;
-
-        maxNextCharInd = (bufpos -= tokenBegin);
-      }
-    } catch (Throwable t) {
-      throw new Error("Error in ExpandBuff",t);
-    }
-
-    bufsize += 2048;
-    available = bufsize;
-    tokenBegin = 0;
-  }
-
-  protected void FillBuff() throws java.io.IOException {
-    if (maxNextCharInd == available) {
-      if (available == bufsize) {
-        if (tokenBegin > 2048) {
-          bufpos = maxNextCharInd = 0;
-          available = tokenBegin;
-        } else if (tokenBegin < 0) {
-          bufpos = maxNextCharInd = 0;
-        } else {
-          ExpandBuff(false);
-        }
-      } else if (available > tokenBegin) {
-        available = bufsize;
-      } else if ((tokenBegin - available) < 2048) {
-        ExpandBuff(true);
-      } else {
-        available = tokenBegin;
-      }
-    }
-
-    int i;
-    try {
-      if ((i = inputStream.read(buffer, maxNextCharInd, available
-          - maxNextCharInd)) == -1) {
-        inputStream.close();
-        throw new java.io.IOException();
-      } else {
-        maxNextCharInd += i;
-      }
-      return;
-    } catch (java.io.IOException e) {
-      --bufpos;
-      backup(0);
-      if (tokenBegin == -1) {
-        tokenBegin = bufpos;
-      }
-      throw e;
-    }
-  }
-
-  public char BeginToken() throws java.io.IOException {
-    tokenBegin = -1;
-    char c = readChar();
-    tokenBegin = bufpos;
-
-    return c;
-  }
-
-  protected void UpdateLineColumn(char c) {
-    column++;
-
-    if (prevCharIsLF) {
-      prevCharIsLF = false;
-      line += (column = 1);
-    } else if (prevCharIsCR) {
-      prevCharIsCR = false;
-      if (c == '\n') {
-        prevCharIsLF = true;
-      } else {
-        line += (column = 1);
-      }
-    }
-
-    switch (c) {
-    case '\r':
-      prevCharIsCR = true;
-      break;
-    case '\n':
-      prevCharIsLF = true;
-      break;
-    case '\t':
-      column--;
-      column += (tabSize - (column % tabSize));
-      break;
-    default:
-      break;
-    }
-
-    bufline[bufpos] = line;
-    bufcolumn[bufpos] = column;
-  }
-
-  public char readChar() throws java.io.IOException {
-    if (inBuf > 0) {
-      --inBuf;
-
-      if (++bufpos == bufsize) {
-        bufpos = 0;
-      }
-
-      return buffer[bufpos];
-    }
-
-    if (++bufpos >= maxNextCharInd) {
-      FillBuff();
-    }
-
-    char c = buffer[bufpos];
-
-    UpdateLineColumn(c);
-    return (c);
-  }
-
-  /**
-   * @deprecated
-   * @see #getEndColumn
-   */
-
-  @Deprecated
-  public int getColumn() {
-    return bufcolumn[bufpos];
-  }
-
-  /**
-   * @deprecated
-   * @see #getEndLine
-   */
-
-  @Deprecated
-  public int getLine() {
-    return bufline[bufpos];
-  }
-
-  public int getEndColumn() {
-    return bufcolumn[bufpos];
-  }
-
-  public int getEndLine() {
-    return bufline[bufpos];
-  }
-
-  public int getBeginColumn() {
-    return bufcolumn[tokenBegin];
-  }
-
-  public int getBeginLine() {
-    return bufline[tokenBegin];
-  }
-
-  public void backup(int amount) {
-
-    inBuf += amount;
-    if ((bufpos -= amount) < 0) {
-      bufpos += bufsize;
-    }
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline,
-      int startcolumn, int buffersize) {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    available = bufsize = buffersize;
-    buffer = new char[buffersize];
-    bufline = new int[buffersize];
-    bufcolumn = new int[buffersize];
-  }
-
-  public SimpleCharStream(java.io.Reader dstream, int startline, int startcolumn) {
-    this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.Reader dstream) {
-    this(dstream, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.Reader dstream, int startline, int startcolumn,
-      int buffersize) {
-    inputStream = dstream;
-    line = startline;
-    column = startcolumn - 1;
-
-    if (buffer == null || buffersize != buffer.length) {
-      available = bufsize = buffersize;
-      buffer = new char[buffersize];
-      bufline = new int[buffersize];
-      bufcolumn = new int[buffersize];
-    }
-    prevCharIsLF = prevCharIsCR = false;
-    tokenBegin = inBuf = maxNextCharInd = 0;
-    bufpos = -1;
-  }
-
-  public void ReInit(java.io.Reader dstream, int startline, int startcolumn) {
-    ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.Reader dstream) {
-    ReInit(dstream, 1, 1, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding,
-      int startline, int startcolumn, int buffersize)
-      throws java.io.UnsupportedEncodingException {
-    this(encoding == null ? new java.io.InputStreamReader(dstream)
-        : new java.io.InputStreamReader(dstream, encoding), startline,
-        startcolumn, buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-      int startcolumn, int buffersize) {
-    this(new java.io.InputStreamReader(dstream), startline, startcolumn,
-        buffersize);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding,
-      int startline, int startcolumn)
-      throws java.io.UnsupportedEncodingException {
-    this(dstream, encoding, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, int startline,
-      int startcolumn) {
-    this(dstream, startline, startcolumn, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream, String encoding)
-      throws java.io.UnsupportedEncodingException {
-    this(dstream, encoding, 1, 1, 4096);
-  }
-
-  public SimpleCharStream(java.io.InputStream dstream) {
-    this(dstream, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding,
-      int startline, int startcolumn, int buffersize)
-      throws java.io.UnsupportedEncodingException {
-    ReInit(encoding == null ? new java.io.InputStreamReader(dstream)
-        : new java.io.InputStreamReader(dstream, encoding), startline,
-        startcolumn, buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline,
-      int startcolumn, int buffersize) {
-    ReInit(new java.io.InputStreamReader(dstream), startline, startcolumn,
-        buffersize);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding)
-      throws java.io.UnsupportedEncodingException {
-    ReInit(dstream, encoding, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream) {
-    ReInit(dstream, 1, 1, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, String encoding,
-      int startline, int startcolumn)
-      throws java.io.UnsupportedEncodingException {
-    ReInit(dstream, encoding, startline, startcolumn, 4096);
-  }
-
-  public void ReInit(java.io.InputStream dstream, int startline, int startcolumn) {
-    ReInit(dstream, startline, startcolumn, 4096);
-  }
-
-  public String GetImage() {
-    if (bufpos >= tokenBegin) {
-      return new String(buffer, tokenBegin, bufpos - tokenBegin + 1);
-    } else {
-      return new String(buffer, tokenBegin, bufsize - tokenBegin)
-          + new String(buffer, 0, bufpos + 1);
-    }
-  }
-
-  public char[] GetSuffix(int len) {
-    char[] ret = new char[len];
-
-    if ((bufpos + 1) >= len) {
-      System.arraycopy(buffer, bufpos - len + 1, ret, 0, len);
-    } else {
-      System.arraycopy(buffer, bufsize - (len - bufpos - 1), ret, 0, len
-          - bufpos - 1);
-      System.arraycopy(buffer, 0, ret, len - bufpos - 1, bufpos + 1);
-    }
-
-    return ret;
-  }
-
-  public void Done() {
-    buffer = null;
-    bufline = null;
-    bufcolumn = null;
-  }
-
-  /**
-   * Method to adjust line and column numbers for the start of a token.
-   */
-  public void adjustBeginLineColumn(int newLine, int newCol) {
-    int start = tokenBegin;
-    int len;
-
-    if (bufpos >= tokenBegin) {
-      len = bufpos - tokenBegin + inBuf + 1;
-    } else {
-      len = bufsize - tokenBegin + bufpos + 1 + inBuf;
-    }
-
-    int i = 0, j = 0, k = 0;
-    int nextColDiff = 0, columnDiff = 0;
-
-    while (i < len
-        && bufline[j = start % bufsize] == bufline[k = ++start % bufsize]) {
-      bufline[j] = newLine;
-      nextColDiff = columnDiff + bufcolumn[k] - bufcolumn[j];
-      bufcolumn[j] = newCol + columnDiff;
-      columnDiff = nextColDiff;
-      i++;
-    }
-
-    if (i < len) {
-      bufline[j] = newLine++;
-      bufcolumn[j] = newCol + columnDiff;
-
-      while (i++ < len) {
-        if (bufline[j = start % bufsize] != bufline[++start % bufsize]) {
-          bufline[j] = newLine++;
-        } else {
-          bufline[j] = newLine;
-        }
-      }
-    }
-
-    line = bufline[j];
-    column = bufcolumn[j];
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/SimpleNode.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/SimpleNode.java
deleted file mode 100644
index 3bfd9ac..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/SimpleNode.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Generated By:JJTree: Do not edit this line. SimpleNode.java */
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class SimpleNode implements Node {
-  protected Node parent;
-  protected Node[] children;
-  protected int id;
-  protected thrift_grammar parser;
-
-  public SimpleNode(int i) {
-    id = i;
-  }
-
-  public SimpleNode(thrift_grammar p, int i) {
-    this(i);
-    parser = p;
-  }
-
-  public void jjtOpen() {
-  }
-
-  public void jjtClose() {
-  }
-
-  public void jjtSetParent(Node n) {
-    parent = n;
-  }
-
-  public Node jjtGetParent() {
-    return parent;
-  }
-
-  public void jjtAddChild(Node n, int i) {
-    if (children == null) {
-      children = new Node[i + 1];
-    } else if (i >= children.length) {
-      Node c[] = new Node[i + 1];
-      System.arraycopy(children, 0, c, 0, children.length);
-      children = c;
-    }
-    children[i] = n;
-  }
-
-  public Node jjtGetChild(int i) {
-    return children[i];
-  }
-
-  public int jjtGetNumChildren() {
-    return (children == null) ? 0 : children.length;
-  }
-
-  /*
-   * You can override these two methods in subclasses of SimpleNode to customize
-   * the way the node appears when the tree is dumped. If your output uses more
-   * than one line you should override toString(String), otherwise overriding
-   * toString() is probably all you need to do.
-   */
-
-  @Override
-  public String toString() {
-    return thrift_grammarTreeConstants.jjtNodeName[id];
-  }
-
-  public String toString(String prefix) {
-    return prefix + toString();
-  }
-
-  /*
-   * Override this method if you want to customize how the node dumps out its
-   * children.
-   */
-
-  public void dump(String prefix) {
-    System.out.println(toString(prefix));
-    if (children != null) {
-      for (int i = 0; i < children.length; ++i) {
-        SimpleNode n = (SimpleNode) children[i];
-        if (n != null) {
-          n.dump(prefix + " ");
-        }
-      }
-    }
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/Token.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/Token.java
deleted file mode 100644
index 8605f80..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/Token.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. Token.java Version 3.0 */
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-/**
- * Describes the input token stream.
- */
-
-public class Token {
-
-  /**
-   * An integer that describes the kind of this token. This numbering system is
-   * determined by JavaCCParser, and a table of these numbers is stored in the
-   * file ...Constants.java.
-   */
-  public int kind;
-
-  /**
-   * beginLine and beginColumn describe the position of the first character of
-   * this token; endLine and endColumn describe the position of the last
-   * character of this token.
-   */
-  public int beginLine, beginColumn, endLine, endColumn;
-
-  /**
-   * The string image of the token.
-   */
-  public String image;
-
-  /**
-   * A reference to the next regular (non-special) token from the input stream.
-   * If this is the last token from the input stream, or if the token manager
-   * has not read tokens beyond this one, this field is set to null. This is
-   * true only if this token is also a regular token. Otherwise, see below for a
-   * description of the contents of this field.
-   */
-  public Token next;
-
-  /**
-   * This field is used to access special tokens that occur prior to this token,
-   * but after the immediately preceding regular (non-special) token. If there
-   * are no such special tokens, this field is set to null. When there are more
-   * than one such special token, this field refers to the last of these special
-   * tokens, which in turn refers to the next previous special token through its
-   * specialToken field, and so on until the first special token (whose
-   * specialToken field is null). The next fields of special tokens refer to
-   * other special tokens that immediately follow it (without an intervening
-   * regular token). If there is no such token, this field is null.
-   */
-  public Token specialToken;
-
-  /**
-   * Returns the image.
-   */
-  @Override
-  public String toString() {
-    return image;
-  }
-
-  /**
-   * Returns a new Token object, by default. However, if you want, you can
-   * create and return subclass objects based on the value of ofKind. Simply add
-   * the cases to the switch for all those special cases. For example, if you
-   * have a subclass of Token called IDToken that you want to create if ofKind
-   * is ID, simlpy add something like :
-   * 
-   * case MyParserConstants.ID : return new IDToken();
-   * 
-   * to the following switch statement. Then you can cast matchedToken variable
-   * to the appropriate type and use it in your lexical actions.
-   */
-  public static final Token newToken(int ofKind) {
-    switch (ofKind) {
-    default:
-      return new Token();
-    }
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/TokenMgrError.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/TokenMgrError.java
deleted file mode 100644
index 1cac87d..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/TokenMgrError.java
+++ /dev/null
@@ -1,136 +0,0 @@
-/* Generated By:JavaCC: Do not edit this line. TokenMgrError.java Version 3.0 */
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-public class TokenMgrError extends Error {
-  /*
-   * Ordinals for various reasons why an Error of this type can be thrown.
-   */
-
-  /**
-   * Lexical error occured.
-   */
-  static final int LEXICAL_ERROR = 0;
-
-  /**
-   * An attempt wass made to create a second instance of a static token manager.
-   */
-  static final int STATIC_LEXER_ERROR = 1;
-
-  /**
-   * Tried to change to an invalid lexical state.
-   */
-  static final int INVALID_LEXICAL_STATE = 2;
-
-  /**
-   * Detected (and bailed out of) an infinite loop in the token manager.
-   */
-  static final int LOOP_DETECTED = 3;
-
-  /**
-   * Indicates the reason why the exception is thrown. It will have one of the
-   * above 4 values.
-   */
-  int errorCode;
-
-  /**
-   * Replaces unprintable characters by their espaced (or unicode escaped)
-   * equivalents in the given string
-   */
-  protected static final String addEscapes(String str) {
-    StringBuilder retval = new StringBuilder();
-    char ch;
-    for (int i = 0; i < str.length(); i++) {
-      switch (str.charAt(i)) {
-      case 0:
-        continue;
-      case '\b':
-        retval.append("\\b");
-        continue;
-      case '\t':
-        retval.append("\\t");
-        continue;
-      case '\n':
-        retval.append("\\n");
-        continue;
-      case '\f':
-        retval.append("\\f");
-        continue;
-      case '\r':
-        retval.append("\\r");
-        continue;
-      case '\"':
-        retval.append("\\\"");
-        continue;
-      case '\'':
-        retval.append("\\\'");
-        continue;
-      case '\\':
-        retval.append("\\\\");
-        continue;
-      default:
-        if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {
-          String s = "0000" + Integer.toString(ch, 16);
-          retval.append("\\u" + s.substring(s.length() - 4, s.length()));
-        } else {
-          retval.append(ch);
-        }
-        continue;
-      }
-    }
-    return retval.toString();
-  }
-
-  /**
-   * Returns a detailed message for the Error when it is thrown by the token
-   * manager to indicate a lexical error. Parameters : EOFSeen : indicates if
-   * EOF caused the lexicl error curLexState : lexical state in which this error
-   * occured errorLine : line number when the error occured errorColumn : column
-   * number when the error occured errorAfter : prefix that was seen before this
-   * error occured curchar : the offending character Note: You can customize the
-   * lexical error message by modifying this method.
-   */
-  protected static String LexicalError(boolean EOFSeen, int lexState,
-      int errorLine, int errorColumn, String errorAfter, char curChar) {
-    return ("Lexical error at line "
-        + errorLine
-        + ", column "
-        + errorColumn
-        + ".  Encountered: "
-        + (EOFSeen ? "<EOF> "
-        : ("\"" + addEscapes(String.valueOf(curChar)) + "\"") + " ("
-        + (int) curChar + "), ") + "after : \""
-        + addEscapes(errorAfter) + "\"");
-  }
-
-  /**
-   * You can also modify the body of this method to customize your error
-   * messages. For example, cases like LOOP_DETECTED and INVALID_LEXICAL_STATE
-   * are not of end-users concern, so you can return something like :
-   * 
-   * "Internal Error : Please file a bug report .... "
-   * 
-   * from this method for such cases in the release version of your parser.
-   */
-  @Override
-  public String getMessage() {
-    return super.getMessage();
-  }
-
-  /*
-   * Constructors of various flavors follow.
-   */
-
-  public TokenMgrError() {
-  }
-
-  public TokenMgrError(String message, int reason) {
-    super(message);
-    errorCode = reason;
-  }
-
-  public TokenMgrError(boolean EOFSeen, int lexState, int errorLine,
-      int errorColumn, String errorAfter, char curChar, int reason) {
-    this(LexicalError(EOFSeen, lexState, errorLine, errorColumn, errorAfter,
-        curChar), reason);
-  }
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.java b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.java
deleted file mode 100644
index b275af0..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.java
+++ /dev/null
@@ -1,3121 +0,0 @@
-/* Generated By:JJTree&JavaCC: Do not edit this line. thrift_grammar.java */
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class thrift_grammar/* @bgen(jjtree) */implements
-    thrift_grammarTreeConstants, thrift_grammarConstants {/* @bgen(jjtree) */
-  protected JJTthrift_grammarState jjtree = new JJTthrift_grammarState();
-  private List<String> include_path = null;
-
-  // for computing the autogenerated field ids in thrift
-  private int field_val;
-
-  // store types and tables
-  // separately because one cannot use a table (ie service.method) as a Struct
-  // like type.
-  protected Map<String, DynamicSerDeSimpleNode> types;
-  protected Map<String, DynamicSerDeSimpleNode> tables;
-
-  // system include path
-  final private static String default_include_path[] = {"/usr/local/include",
-      "/usr/include", "/usr/local/include/thrift/if",
-      "/usr/local/include/fb303/if"};
-
-  // need three params to differentiate between this and 2 param method auto
-  // generated since
-  // some calls in the autogenerated code use null param for 2nd param and thus
-  // ambiguous.
-  protected thrift_grammar(InputStream is, List<String> include_path,
-      boolean junk) {
-    this(is, null);
-    types = new HashMap<String, DynamicSerDeSimpleNode>();
-    tables = new HashMap<String, DynamicSerDeSimpleNode>();
-    this.include_path = include_path;
-    field_val = -1;
-  }
-
-  // find the file on the include path
-  private static File findFile(String fname, List<String> include_path) {
-    for (String path : include_path) {
-      final String full = path + "/" + fname;
-      File f = new File(full);
-      if (f.exists()) {
-        return f;
-      }
-    }
-    return null;
-  }
-
-  public static void main(String args[]) {
-    String filename = null;
-    List<String> include_path = new ArrayList<String>();
-
-    for (String path : default_include_path) {
-      include_path.add(path);
-    }
-    for (int i = 0; i < args.length; i++) {
-      String arg = args[i];
-      if (arg.equals("--include") && i + 1 < args.length) {
-        include_path.add(args[++i]);
-      }
-      if (arg.equals("--file") && i + 1 < args.length) {
-        filename = args[++i];
-      }
-    }
-
-    InputStream is = System.in;
-    if (filename != null) {
-      try {
-        is = new FileInputStream(findFile(filename, include_path));
-      } catch (IOException e) {
-      }
-    }
-    thrift_grammar t = new thrift_grammar(is, include_path, false);
-
-    try {
-      t.Start();
-    } catch (Exception e) {
-      System.out.println("Parse error.");
-      System.out.println(e.getMessage());
-      e.printStackTrace();
-    }
-  }
-
-  final public SimpleNode Start() throws ParseException {
-    /* @bgen(jjtree) Start */
-    DynamicSerDeStart jjtn000 = new DynamicSerDeStart(JJTSTART);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      HeaderList();
-      label_1: while (true) {
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case 59:
-        case 60:
-          CommaOrSemicolon();
-          break;
-        default:
-          jj_la1[0] = jj_gen;
-          ;
-        }
-        Definition();
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case tok_const:
-        case tok_senum:
-        case tok_typedef:
-        case tok_struct:
-        case tok_exception:
-        case tok_service:
-        case tok_enum:
-        case 59:
-        case 60:
-          ;
-          break;
-        default:
-          jj_la1[1] = jj_gen;
-          break label_1;
-        }
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode HeaderList() throws ParseException {
-    /* @bgen(jjtree) HeaderList */
-    DynamicSerDeHeaderList jjtn000 = new DynamicSerDeHeaderList(JJTHEADERLIST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      label_2: while (true) {
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case tok_namespace:
-        case tok_cpp_namespace:
-        case tok_cpp_include:
-        case tok_java_package:
-        case tok_cocoa_prefix:
-        case tok_csharp_namespace:
-        case tok_php_namespace:
-        case tok_py_module:
-        case tok_perl_package:
-        case tok_ruby_namespace:
-        case tok_smalltalk_category:
-        case tok_smalltalk_prefix:
-        case tok_xsd_namespace:
-        case tok_include:
-          ;
-          break;
-        default:
-          jj_la1[2] = jj_gen;
-          break label_2;
-        }
-        Header();
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Header() throws ParseException {
-    /* @bgen(jjtree) Header */
-    DynamicSerDeHeader jjtn000 = new DynamicSerDeHeader(JJTHEADER);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_include:
-        Include();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_namespace:
-      case tok_cpp_namespace:
-      case tok_cpp_include:
-      case tok_java_package:
-      case tok_cocoa_prefix:
-      case tok_csharp_namespace:
-      case tok_php_namespace:
-      case tok_py_module:
-      case tok_perl_package:
-      case tok_ruby_namespace:
-      case tok_smalltalk_category:
-      case tok_smalltalk_prefix:
-      case tok_xsd_namespace:
-        Namespace();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[3] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Namespace() throws ParseException {
-    /* @bgen(jjtree) Namespace */
-    DynamicSerDeNamespace jjtn000 = new DynamicSerDeNamespace(JJTNAMESPACE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_namespace:
-        jj_consume_token(tok_namespace);
-        jj_consume_token(IDENTIFIER);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_cpp_namespace:
-        jj_consume_token(tok_cpp_namespace);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_cpp_include:
-        jj_consume_token(tok_cpp_include);
-        jj_consume_token(tok_literal);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_php_namespace:
-        jj_consume_token(tok_php_namespace);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_py_module:
-        jj_consume_token(tok_py_module);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_perl_package:
-        jj_consume_token(tok_perl_package);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_ruby_namespace:
-        jj_consume_token(tok_ruby_namespace);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_smalltalk_category:
-        jj_consume_token(tok_smalltalk_category);
-        jj_consume_token(tok_st_identifier);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_smalltalk_prefix:
-        jj_consume_token(tok_smalltalk_prefix);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_java_package:
-        jj_consume_token(tok_java_package);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_cocoa_prefix:
-        jj_consume_token(tok_cocoa_prefix);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_xsd_namespace:
-        jj_consume_token(tok_xsd_namespace);
-        jj_consume_token(tok_literal);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_csharp_namespace:
-        jj_consume_token(tok_csharp_namespace);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[4] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Include() throws ParseException {
-    /* @bgen(jjtree) Include */
-    DynamicSerDeInclude jjtn000 = new DynamicSerDeInclude(JJTINCLUDE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    String fname;
-    boolean found = false;
-    try {
-      jj_consume_token(tok_include);
-      fname = jj_consume_token(tok_literal).image;
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      // bugbug somewhat fragile below substring expression
-      fname = fname.substring(1, fname.length() - 1);
-
-      // try to find the file on the include path
-      File f = thrift_grammar.findFile(fname, include_path);
-      if (f != null) {
-        found = true;
-        try {
-          FileInputStream fis = new FileInputStream(f);
-          thrift_grammar t = new thrift_grammar(fis, include_path, false);
-          t.Start();
-          fis.close();
-          found = true;
-          // add in what we found to our type and table tables.
-          tables.putAll(t.tables);
-          types.putAll(t.types);
-        } catch (Exception e) {
-          System.out.println("File: " + fname + " - Oops.");
-          System.out.println(e.getMessage());
-          e.printStackTrace();
-        }
-      }
-      if (!found) {
-        {
-          if (true) {
-            throw new RuntimeException("include file not found: " + fname);
-          }
-        }
-      }
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Definition() throws ParseException {
-    /* @bgen(jjtree) Definition */
-    DynamicSerDeDefinition jjtn000 = new DynamicSerDeDefinition(JJTDEFINITION);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_const:
-        Const();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_service:
-        Service();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_senum:
-      case tok_typedef:
-      case tok_struct:
-      case tok_exception:
-      case tok_enum:
-        TypeDefinition();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[5] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode TypeDefinition() throws ParseException {
-    /* @bgen(jjtree) TypeDefinition */
-    DynamicSerDeTypeDefinition jjtn000 = new DynamicSerDeTypeDefinition(
-        JJTTYPEDEFINITION);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_typedef:
-        Typedef();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_enum:
-        Enum();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_senum:
-        Senum();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_struct:
-        Struct();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_exception:
-        Xception();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[6] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypedef Typedef() throws ParseException {
-    /* @bgen(jjtree) Typedef */
-    DynamicSerDeTypedef jjtn000 = new DynamicSerDeTypedef(JJTTYPEDEF);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_typedef);
-      DefinitionType();
-      jjtn000.name = jj_consume_token(IDENTIFIER).image;
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      // store the type for later retrieval
-      types.put(jjtn000.name, jjtn000);
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  // returning void because we ignore this production.
-  final public void CommaOrSemicolon() throws ParseException {
-    /* @bgen(jjtree) CommaOrSemicolon */
-    DynamicSerDeCommaOrSemicolon jjtn000 = new DynamicSerDeCommaOrSemicolon(
-        JJTCOMMAORSEMICOLON);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 59:
-        jj_consume_token(59);
-        break;
-      case 60:
-        jj_consume_token(60);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      default:
-        jj_la1[7] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-  }
-
-  final public SimpleNode Enum() throws ParseException {
-    /* @bgen(jjtree) Enum */
-    DynamicSerDeEnum jjtn000 = new DynamicSerDeEnum(JJTENUM);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_enum);
-      jj_consume_token(IDENTIFIER);
-      jj_consume_token(61);
-      EnumDefList();
-      jj_consume_token(62);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode EnumDefList() throws ParseException {
-    /* @bgen(jjtree) EnumDefList */
-    DynamicSerDeEnumDefList jjtn000 = new DynamicSerDeEnumDefList(
-        JJTENUMDEFLIST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      label_3: while (true) {
-        EnumDef();
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case IDENTIFIER:
-          ;
-          break;
-        default:
-          jj_la1[8] = jj_gen;
-          break label_3;
-        }
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode EnumDef() throws ParseException {
-    /* @bgen(jjtree) EnumDef */
-    DynamicSerDeEnumDef jjtn000 = new DynamicSerDeEnumDef(JJTENUMDEF);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(IDENTIFIER);
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 63:
-        jj_consume_token(63);
-        jj_consume_token(tok_int_constant);
-        break;
-      default:
-        jj_la1[9] = jj_gen;
-        ;
-      }
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 59:
-      case 60:
-        CommaOrSemicolon();
-        break;
-      default:
-        jj_la1[10] = jj_gen;
-        ;
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Senum() throws ParseException {
-    /* @bgen(jjtree) Senum */
-    DynamicSerDeSenum jjtn000 = new DynamicSerDeSenum(JJTSENUM);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_senum);
-      jj_consume_token(IDENTIFIER);
-      jj_consume_token(61);
-      SenumDefList();
-      jj_consume_token(62);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode SenumDefList() throws ParseException {
-    /* @bgen(jjtree) SenumDefList */
-    DynamicSerDeSenumDefList jjtn000 = new DynamicSerDeSenumDefList(
-        JJTSENUMDEFLIST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      label_4: while (true) {
-        SenumDef();
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case tok_literal:
-          ;
-          break;
-        default:
-          jj_la1[11] = jj_gen;
-          break label_4;
-        }
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode SenumDef() throws ParseException {
-    /* @bgen(jjtree) SenumDef */
-    DynamicSerDeSenumDef jjtn000 = new DynamicSerDeSenumDef(JJTSENUMDEF);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_literal);
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 59:
-      case 60:
-        CommaOrSemicolon();
-        break;
-      default:
-        jj_la1[12] = jj_gen;
-        ;
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Const() throws ParseException {
-    /* @bgen(jjtree) Const */
-    DynamicSerDeConst jjtn000 = new DynamicSerDeConst(JJTCONST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_const);
-      FieldType();
-      jj_consume_token(IDENTIFIER);
-      jj_consume_token(63);
-      ConstValue();
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 59:
-      case 60:
-        CommaOrSemicolon();
-        break;
-      default:
-        jj_la1[13] = jj_gen;
-        ;
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode ConstValue() throws ParseException {
-    /* @bgen(jjtree) ConstValue */
-    DynamicSerDeConstValue jjtn000 = new DynamicSerDeConstValue(JJTCONSTVALUE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_int_constant:
-        jj_consume_token(tok_int_constant);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      case tok_double_constant:
-        jj_consume_token(tok_double_constant);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      case tok_literal:
-        jj_consume_token(tok_literal);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      case IDENTIFIER:
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      case 64:
-        ConstList();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      case 61:
-        ConstMap();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[14] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode ConstList() throws ParseException {
-    /* @bgen(jjtree) ConstList */
-    DynamicSerDeConstList jjtn000 = new DynamicSerDeConstList(JJTCONSTLIST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(64);
-      ConstListContents();
-      jj_consume_token(65);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode ConstListContents() throws ParseException {
-    /* @bgen(jjtree) ConstListContents */
-    DynamicSerDeConstListContents jjtn000 = new DynamicSerDeConstListContents(
-        JJTCONSTLISTCONTENTS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      label_5: while (true) {
-        ConstValue();
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case 59:
-        case 60:
-          CommaOrSemicolon();
-          break;
-        default:
-          jj_la1[15] = jj_gen;
-          ;
-        }
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case tok_int_constant:
-        case tok_double_constant:
-        case IDENTIFIER:
-        case tok_literal:
-        case 61:
-        case 64:
-          ;
-          break;
-        default:
-          jj_la1[16] = jj_gen;
-          break label_5;
-        }
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode ConstMap() throws ParseException {
-    /* @bgen(jjtree) ConstMap */
-    DynamicSerDeConstMap jjtn000 = new DynamicSerDeConstMap(JJTCONSTMAP);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(61);
-      ConstMapContents();
-      jj_consume_token(62);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode ConstMapContents() throws ParseException {
-    /* @bgen(jjtree) ConstMapContents */
-    DynamicSerDeConstMapContents jjtn000 = new DynamicSerDeConstMapContents(
-        JJTCONSTMAPCONTENTS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_int_constant:
-      case tok_double_constant:
-      case IDENTIFIER:
-      case tok_literal:
-      case 61:
-      case 64:
-        label_6: while (true) {
-          ConstValue();
-          jj_consume_token(66);
-          ConstValue();
-          switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-          case 59:
-          case 60:
-            CommaOrSemicolon();
-            break;
-          default:
-            jj_la1[17] = jj_gen;
-            ;
-          }
-          switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-          case tok_int_constant:
-          case tok_double_constant:
-          case IDENTIFIER:
-          case tok_literal:
-          case 61:
-          case 64:
-            ;
-            break;
-          default:
-            jj_la1[18] = jj_gen;
-            break label_6;
-          }
-        }
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      default:
-        jj_la1[19] = jj_gen;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeStruct Struct() throws ParseException {
-    /* @bgen(jjtree) Struct */
-    DynamicSerDeStruct jjtn000 = new DynamicSerDeStruct(JJTSTRUCT);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_struct);
-      jjtn000.name = jj_consume_token(IDENTIFIER).image;
-      jj_consume_token(61);
-      FieldList();
-      jj_consume_token(62);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      types.put(jjtn000.name, jjtn000);
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Xception() throws ParseException {
-    /* @bgen(jjtree) Xception */
-    DynamicSerDeXception jjtn000 = new DynamicSerDeXception(JJTXCEPTION);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_exception);
-      jj_consume_token(IDENTIFIER);
-      jj_consume_token(61);
-      FieldList();
-      jj_consume_token(62);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Service() throws ParseException {
-    /* @bgen(jjtree) Service */
-    DynamicSerDeService jjtn000 = new DynamicSerDeService(JJTSERVICE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_service);
-      jj_consume_token(IDENTIFIER);
-      Extends();
-      jj_consume_token(61);
-      FlagArgs();
-      label_7: while (true) {
-        Function();
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case tok_void:
-        case tok_bool:
-        case tok_i16:
-        case tok_i32:
-        case tok_i64:
-        case tok_double:
-        case tok_string:
-        case tok_map:
-        case tok_list:
-        case tok_set:
-        case tok_async:
-        case IDENTIFIER:
-          ;
-          break;
-        default:
-          jj_la1[20] = jj_gen;
-          break label_7;
-        }
-      }
-      UnflagArgs();
-      jj_consume_token(62);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      // at some point, these should be inserted as a "db"
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode FlagArgs() throws ParseException {
-    /* @bgen(jjtree) FlagArgs */
-    DynamicSerDeFlagArgs jjtn000 = new DynamicSerDeFlagArgs(JJTFLAGARGS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode UnflagArgs() throws ParseException {
-    /* @bgen(jjtree) UnflagArgs */
-    DynamicSerDeUnflagArgs jjtn000 = new DynamicSerDeUnflagArgs(JJTUNFLAGARGS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode Extends() throws ParseException {
-    /* @bgen(jjtree) Extends */
-    DynamicSerDeExtends jjtn000 = new DynamicSerDeExtends(JJTEXTENDS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_extends:
-        jj_consume_token(tok_extends);
-        jj_consume_token(IDENTIFIER);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[21] = jj_gen;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeFunction Function() throws ParseException {
-    /* @bgen(jjtree) Function */
-    DynamicSerDeFunction jjtn000 = new DynamicSerDeFunction(JJTFUNCTION);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      Async();
-      FunctionType();
-      // the name of the function/table
-      jjtn000.name = jj_consume_token(IDENTIFIER).image;
-      jj_consume_token(67);
-      FieldList();
-      jj_consume_token(68);
-      Throws();
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 59:
-      case 60:
-        CommaOrSemicolon();
-        break;
-      default:
-        jj_la1[22] = jj_gen;
-        ;
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      tables.put(jjtn000.name, jjtn000);
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void Async() throws ParseException {
-    /* @bgen(jjtree) Async */
-    DynamicSerDeAsync jjtn000 = new DynamicSerDeAsync(JJTASYNC);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_async:
-        jj_consume_token(tok_async);
-        break;
-      default:
-        jj_la1[23] = jj_gen;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-  }
-
-  final public void Throws() throws ParseException {
-    /* @bgen(jjtree) Throws */
-    DynamicSerDeThrows jjtn000 = new DynamicSerDeThrows(JJTTHROWS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_throws:
-        jj_consume_token(tok_throws);
-        jj_consume_token(67);
-        FieldList();
-        jj_consume_token(68);
-        break;
-      default:
-        jj_la1[24] = jj_gen;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-  }
-
-  // nothing special - just use the DynamicSerDeFieldList's children methods to
-  // access the fields
-  final public DynamicSerDeFieldList FieldList() throws ParseException {
-    /* @bgen(jjtree) FieldList */
-    DynamicSerDeFieldList jjtn000 = new DynamicSerDeFieldList(JJTFIELDLIST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    field_val = -1;
-    try {
-      label_8: while (true) {
-        switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-        case tok_bool:
-        case tok_i16:
-        case tok_i32:
-        case tok_i64:
-        case tok_double:
-        case tok_string:
-        case tok_map:
-        case tok_list:
-        case tok_set:
-        case tok_required:
-        case tok_optional:
-        case tok_skip:
-        case tok_int_constant:
-        case IDENTIFIER:
-          ;
-          break;
-        default:
-          jj_la1[25] = jj_gen;
-          break label_8;
-        }
-        Field();
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeField Field() throws ParseException {
-    /* @bgen(jjtree) Field */
-    DynamicSerDeField jjtn000 = new DynamicSerDeField(JJTFIELD);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    String fidnum = "";
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_int_constant:
-        fidnum = jj_consume_token(tok_int_constant).image;
-        jj_consume_token(66);
-        break;
-      default:
-        jj_la1[26] = jj_gen;
-        ;
-      }
-      FieldRequiredness();
-      FieldType();
-      // the name of the field - not optional
-      jjtn000.name = jj_consume_token(IDENTIFIER).image;
-      FieldValue();
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 59:
-      case 60:
-        CommaOrSemicolon();
-        break;
-      default:
-        jj_la1[27] = jj_gen;
-        ;
-      }
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      if (fidnum.length() > 0) {
-        int fidInt = Integer.parseInt(fidnum);
-        jjtn000.fieldid = fidInt;
-      } else {
-        jjtn000.fieldid = field_val--;
-      }
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeFieldRequiredness FieldRequiredness()
-      throws ParseException {
-    /* @bgen(jjtree) FieldRequiredness */
-    DynamicSerDeFieldRequiredness jjtn000 = new DynamicSerDeFieldRequiredness(
-        JJTFIELDREQUIREDNESS);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_required:
-        jj_consume_token(tok_required);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        jjtn000.requiredness = DynamicSerDeFieldRequiredness.RequirednessTypes.Required;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_optional:
-        jj_consume_token(tok_optional);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        jjtn000.requiredness = DynamicSerDeFieldRequiredness.RequirednessTypes.Optional;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_skip:
-        jj_consume_token(tok_skip);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        jjtn000.requiredness = DynamicSerDeFieldRequiredness.RequirednessTypes.Skippable;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[28] = jj_gen;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode FieldValue() throws ParseException {
-    /* @bgen(jjtree) FieldValue */
-    DynamicSerDeFieldValue jjtn000 = new DynamicSerDeFieldValue(JJTFIELDVALUE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case 63:
-        jj_consume_token(63);
-        ConstValue();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[29] = jj_gen;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public SimpleNode DefinitionType() throws ParseException {
-    /* @bgen(jjtree) DefinitionType */
-    DynamicSerDeDefinitionType jjtn000 = new DynamicSerDeDefinitionType(
-        JJTDEFINITIONTYPE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_string:
-        TypeString();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_bool:
-        TypeBool();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_i16:
-        Typei16();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_i32:
-        Typei32();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_i64:
-        Typei64();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_double:
-        TypeDouble();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_map:
-        TypeMap();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_set:
-        TypeSet();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_list:
-        TypeList();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[30] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public void FunctionType() throws ParseException {
-    /* @bgen(jjtree) FunctionType */
-    DynamicSerDeFunctionType jjtn000 = new DynamicSerDeFunctionType(
-        JJTFUNCTIONTYPE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_bool:
-      case tok_i16:
-      case tok_i32:
-      case tok_i64:
-      case tok_double:
-      case tok_string:
-      case tok_map:
-      case tok_list:
-      case tok_set:
-      case IDENTIFIER:
-        FieldType();
-        break;
-      case tok_void:
-        jj_consume_token(tok_void);
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-
-        break;
-      default:
-        jj_la1[31] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-  }
-
-  final public DynamicSerDeFieldType FieldType() throws ParseException {
-    /* @bgen(jjtree) FieldType */
-    DynamicSerDeFieldType jjtn000 = new DynamicSerDeFieldType(JJTFIELDTYPE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      switch ((jj_ntk == -1) ? jj_ntk() : jj_ntk) {
-      case tok_string:
-        TypeString();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_bool:
-        TypeBool();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_i16:
-        Typei16();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_i32:
-        Typei32();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_i64:
-        Typei64();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_double:
-        TypeDouble();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_map:
-        TypeMap();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_set:
-        TypeSet();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case tok_list:
-        TypeList();
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      case IDENTIFIER:
-        jjtn000.name = jj_consume_token(IDENTIFIER).image;
-        jjtree.closeNodeScope(jjtn000, true);
-        jjtc000 = false;
-        if (types.get(jjtn000.name) == null) {
-          System.err.println("ERROR: DDL specifying type " + jjtn000.name
-              + " which has not been defined");
-          {
-            if (true) {
-              throw new RuntimeException("specifying type " + jjtn000.name
-                  + " which has not been defined");
-            }
-          }
-        }
-        // lookup the specified type and set this nodes type to it. Precludes
-        // forward and self references for now.
-        jjtn000.jjtAddChild(types.get(jjtn000.name), 0);
-        {
-          if (true) {
-            return jjtn000;
-          }
-        }
-        break;
-      default:
-        jj_la1[32] = jj_gen;
-        jj_consume_token(-1);
-        throw new ParseException();
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeString TypeString() throws ParseException {
-    /* @bgen(jjtree) TypeString */
-    DynamicSerDeTypeString jjtn000 = new DynamicSerDeTypeString(JJTTYPESTRING);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_string);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeByte TypeByte() throws ParseException {
-    /* @bgen(jjtree) TypeByte */
-    DynamicSerDeTypeByte jjtn000 = new DynamicSerDeTypeByte(JJTTYPEBYTE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_byte);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypei16 Typei16() throws ParseException {
-    /* @bgen(jjtree) Typei16 */
-    DynamicSerDeTypei16 jjtn000 = new DynamicSerDeTypei16(JJTTYPEI16);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_i16);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypei32 Typei32() throws ParseException {
-    /* @bgen(jjtree) Typei32 */
-    DynamicSerDeTypei32 jjtn000 = new DynamicSerDeTypei32(JJTTYPEI32);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_i32);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypei64 Typei64() throws ParseException {
-    /* @bgen(jjtree) Typei64 */
-    DynamicSerDeTypei64 jjtn000 = new DynamicSerDeTypei64(JJTTYPEI64);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_i64);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeDouble TypeDouble() throws ParseException {
-    /* @bgen(jjtree) TypeDouble */
-    DynamicSerDeTypeDouble jjtn000 = new DynamicSerDeTypeDouble(JJTTYPEDOUBLE);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_double);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeBool TypeBool() throws ParseException {
-    /* @bgen(jjtree) TypeBool */
-    DynamicSerDeTypeBool jjtn000 = new DynamicSerDeTypeBool(JJTTYPEBOOL);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_bool);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeMap TypeMap() throws ParseException {
-    /* @bgen(jjtree) TypeMap */
-    DynamicSerDeTypeMap jjtn000 = new DynamicSerDeTypeMap(JJTTYPEMAP);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_map);
-      jj_consume_token(69);
-      FieldType();
-      jj_consume_token(59);
-      FieldType();
-      jj_consume_token(70);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeSet TypeSet() throws ParseException {
-    /* @bgen(jjtree) TypeSet */
-    DynamicSerDeTypeSet jjtn000 = new DynamicSerDeTypeSet(JJTTYPESET);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_set);
-      jj_consume_token(69);
-      FieldType();
-      jj_consume_token(70);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  final public DynamicSerDeTypeList TypeList() throws ParseException {
-    /* @bgen(jjtree) TypeList */
-    DynamicSerDeTypeList jjtn000 = new DynamicSerDeTypeList(JJTTYPELIST);
-    boolean jjtc000 = true;
-    jjtree.openNodeScope(jjtn000);
-    try {
-      jj_consume_token(tok_list);
-      jj_consume_token(69);
-      FieldType();
-      jj_consume_token(70);
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-      {
-        if (true) {
-          return jjtn000;
-        }
-      }
-    } catch (Throwable jjte000) {
-      if (jjtc000) {
-        jjtree.clearNodeScope(jjtn000);
-        jjtc000 = false;
-      } else {
-        jjtree.popNode();
-      }
-      if (jjte000 instanceof RuntimeException) {
-        {
-          if (true) {
-            throw (RuntimeException) jjte000;
-          }
-        }
-      }
-      if (jjte000 instanceof ParseException) {
-        {
-          if (true) {
-            throw (ParseException) jjte000;
-          }
-        }
-      }
-      {
-        if (true) {
-          throw (Error) jjte000;
-        }
-      }
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-    throw new Error("Missing return statement in function");
-  }
-
-  /** Generated Token Manager. */
-  public thrift_grammarTokenManager token_source;
-  SimpleCharStream jj_input_stream;
-  /** Current token. */
-  public Token token;
-  /** Next token. */
-  public Token jj_nt;
-  private int jj_ntk;
-  private int jj_gen;
-  final private int[] jj_la1 = new int[33];
-  static private int[] jj_la1_0;
-  static private int[] jj_la1_1;
-  static private int[] jj_la1_2;
-  static {
-    jj_la1_init_0();
-    jj_la1_init_1();
-    jj_la1_init_2();
-  }
-
-  private static void jj_la1_init_0() {
-    jj_la1_0 = new int[] {0x0, 0x100, 0xa3fee00, 0xa3fee00, 0x23fee00, 0x100,
-        0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-        0xb0000000, 0x0, 0x0, 0x0, 0x0, 0xa0000000, 0x0, 0x0, 0x0, 0x0,
-        0xa0000000, 0xb0000000, 0xa0000000,};
-  }
-
-  private static void jj_la1_init_1() {
-    jj_la1_1 = new int[] {0x18000000, 0x18019c20, 0x0, 0x0, 0x0, 0x19c20,
-        0x11c20, 0x18000000, 0x400000, 0x80000000, 0x18000000, 0x2000000,
-        0x18000000, 0x18000000, 0x22700000, 0x18000000, 0x22700000, 0x18000000,
-        0x22700000, 0x22700000, 0x4003cf, 0x2000, 0x18000000, 0x200, 0x4000,
-        0x5e01cf, 0x100000, 0x18000000, 0xe0000, 0x80000000, 0x1cf, 0x4001cf,
-        0x4001cf,};
-  }
-
-  private static void jj_la1_init_2() {
-    jj_la1_2 = new int[] {0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
-        0x0, 0x0, 0x0, 0x0, 0x1, 0x0, 0x1, 0x0, 0x1, 0x1, 0x0, 0x0, 0x0, 0x0,
-        0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,};
-  }
-
-  /** Constructor with InputStream. */
-  public thrift_grammar(java.io.InputStream stream) {
-    this(stream, null);
-  }
-
-  /** Constructor with InputStream and supplied encoding */
-  public thrift_grammar(java.io.InputStream stream, String encoding) {
-    try {
-      jj_input_stream = new SimpleCharStream(stream, encoding, 1, 1);
-    } catch (java.io.UnsupportedEncodingException e) {
-      throw new RuntimeException(e);
-    }
-    token_source = new thrift_grammarTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 33; i++) {
-      jj_la1[i] = -1;
-    }
-  }
-
-  /** Reinitialise. */
-  public void ReInit(java.io.InputStream stream) {
-    ReInit(stream, null);
-  }
-
-  /** Reinitialise. */
-  public void ReInit(java.io.InputStream stream, String encoding) {
-    try {
-      jj_input_stream.ReInit(stream, encoding, 1, 1);
-    } catch (java.io.UnsupportedEncodingException e) {
-      throw new RuntimeException(e);
-    }
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 33; i++) {
-      jj_la1[i] = -1;
-    }
-  }
-
-  /** Constructor. */
-  public thrift_grammar(java.io.Reader stream) {
-    jj_input_stream = new SimpleCharStream(stream, 1, 1);
-    token_source = new thrift_grammarTokenManager(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 33; i++) {
-      jj_la1[i] = -1;
-    }
-  }
-
-  /** Reinitialise. */
-  public void ReInit(java.io.Reader stream) {
-    jj_input_stream.ReInit(stream, 1, 1);
-    token_source.ReInit(jj_input_stream);
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 33; i++) {
-      jj_la1[i] = -1;
-    }
-  }
-
-  /** Constructor with generated Token Manager. */
-  public thrift_grammar(thrift_grammarTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jj_gen = 0;
-    for (int i = 0; i < 33; i++) {
-      jj_la1[i] = -1;
-    }
-  }
-
-  /** Reinitialise. */
-  public void ReInit(thrift_grammarTokenManager tm) {
-    token_source = tm;
-    token = new Token();
-    jj_ntk = -1;
-    jjtree.reset();
-    jj_gen = 0;
-    for (int i = 0; i < 33; i++) {
-      jj_la1[i] = -1;
-    }
-  }
-
-  private Token jj_consume_token(int kind) throws ParseException {
-    Token oldToken;
-    if ((oldToken = token).next != null) {
-      token = token.next;
-    } else {
-      token = token.next = token_source.getNextToken();
-    }
-    jj_ntk = -1;
-    if (token.kind == kind) {
-      jj_gen++;
-      return token;
-    }
-    token = oldToken;
-    jj_kind = kind;
-    throw generateParseException();
-  }
-
-  /** Get the next Token. */
-  final public Token getNextToken() {
-    if (token.next != null) {
-      token = token.next;
-    } else {
-      token = token.next = token_source.getNextToken();
-    }
-    jj_ntk = -1;
-    jj_gen++;
-    return token;
-  }
-
-  /** Get the specific Token. */
-  final public Token getToken(int index) {
-    Token t = token;
-    for (int i = 0; i < index; i++) {
-      if (t.next != null) {
-        t = t.next;
-      } else {
-        t = t.next = token_source.getNextToken();
-      }
-    }
-    return t;
-  }
-
-  private int jj_ntk() {
-    if ((jj_nt = token.next) == null) {
-      return (jj_ntk = (token.next = token_source.getNextToken()).kind);
-    } else {
-      return (jj_ntk = jj_nt.kind);
-    }
-  }
-
-  private final java.util.List jj_expentries = new java.util.ArrayList();
-  private int[] jj_expentry;
-  private int jj_kind = -1;
-
-  /** Generate ParseException. */
-  public ParseException generateParseException() {
-    jj_expentries.clear();
-    boolean[] la1tokens = new boolean[71];
-    if (jj_kind >= 0) {
-      la1tokens[jj_kind] = true;
-      jj_kind = -1;
-    }
-    for (int i = 0; i < 33; i++) {
-      if (jj_la1[i] == jj_gen) {
-        for (int j = 0; j < 32; j++) {
-          if ((jj_la1_0[i] & (1 << j)) != 0) {
-            la1tokens[j] = true;
-          }
-          if ((jj_la1_1[i] & (1 << j)) != 0) {
-            la1tokens[32 + j] = true;
-          }
-          if ((jj_la1_2[i] & (1 << j)) != 0) {
-            la1tokens[64 + j] = true;
-          }
-        }
-      }
-    }
-    for (int i = 0; i < 71; i++) {
-      if (la1tokens[i]) {
-        jj_expentry = new int[1];
-        jj_expentry[0] = i;
-        jj_expentries.add(jj_expentry);
-      }
-    }
-    int[][] exptokseq = new int[jj_expentries.size()][];
-    for (int i = 0; i < jj_expentries.size(); i++) {
-      exptokseq[i] = (int[]) jj_expentries.get(i);
-    }
-    return new ParseException(token, exptokseq, tokenImage);
-  }
-
-  /** Enable tracing. */
-  final public void enable_tracing() {
-  }
-
-  /** Disable tracing. */
-  final public void disable_tracing() {
-  }
-
-}
diff --git a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj b/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj
deleted file mode 100644
index e214d54..0000000
--- a/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj
+++ /dev/null
@@ -1,2367 +0,0 @@
-/*@bgen(jjtree) Generated By:JJTree: Do not edit this line. /home/pwyckoff/hive-core/serde/src/java/org/apache/hadoop/hive/serde2/dynamic_type/thrift_grammar.jj */
-/*@egen*/options {
-            
- STATIC = false;
-                              
-}
-
-
-PARSER_BEGIN(thrift_grammar)
-
-package org.apache.hadoop.hive.serde2.dynamic_type;
-
-import java.util.*;
-import java.io.*;
-import java.net.*;
-import com.facebook.thrift.protocol.*;
-import com.facebook.thrift.transport.*;
-import org.apache.hadoop.hive.serde2.dynamic_type.*;
-
-public class thrift_grammar/*@bgen(jjtree)*/implements thrift_grammarTreeConstants/*@egen*/ {/*@bgen(jjtree)*/
-  protected JJTthrift_grammarState jjtree = new JJTthrift_grammarState();
-
-/*@egen*/
-
-    private List<String> include_path = null;
-
-    // for computing the autogenerated field ids in thrift
-    private  int field_val;
-
-    // store types and tables
-    // separately because one cannot use a table (ie service.method) as a Struct like type.
-    protected Map<String,DynamicSerDeSimpleNode> types;
-    protected Map<String,DynamicSerDeSimpleNode> tables;
-
-    // system include path
-    final private static String default_include_path[] = {  "/usr/local/include","/usr/include","/usr/local/include/thrift/if","/usr/local/include/fb303/if" };
-
-    // need three params to differentiate between this and 2 param method auto generated since
-    // some calls in the autogenerated code use null param for 2nd param and thus ambiguous.
-    protected thrift_grammar(InputStream is, List<String> include_path, boolean junk) {
-        this(is,null);
-        this.types = new HashMap<String,DynamicSerDeSimpleNode> () ;
-        this.tables = new HashMap<String,DynamicSerDeSimpleNode> () ;
-        this.include_path = include_path;
-        this.field_val = -1;
-    }
-
-    // find the file on the include path
-    private static File findFile(String fname, List<String> include_path) {
-        for(String path: include_path) {
-            final String full = path + "/" + fname;
-            File f = new File(full);
-            if(f.exists()) {
-                return f;
-            }
-        }
-        return null;
-    }
-
-    public static void main(String args[]) {
-        String filename = null;
-        List<String> include_path = new ArrayList<String>();
-
-        for(String path: default_include_path)  {
-            include_path.add(path);
-        }
-        for(int i = 0; i < args.length; i++) {
-            String arg = args[i];
-            if(arg.equals("--include") && i + 1 < args.length) {
-                include_path.add(args[++i]);
-            }
-            if(arg.equals("--file") && i + 1 < args.length) {
-                filename = args[++i];
-            }
-        }
-
-        InputStream is = System.in;
-        if(filename != null) {
-            try {
-                  is = new FileInputStream(findFile(filename, include_path));
-            } catch(IOException e) {
-            }
-        }
-        thrift_grammar t = new thrift_grammar(is,include_path,false);
-
-          try {
-            t.Start();
-        } catch (Exception e) {
-            System.out.println("Parse error.");
-            System.out.println(e.getMessage());
-            e.printStackTrace();
-        }
-    }
-}
-
-PARSER_END(thrift_grammar)
-
-
-
-SKIP :
-{
-  " "
-| "\t"
-| "\n"
-| "\r"
-| <"#"(~["\n"])* ("\n"|"\r"|"\r\n")>
-| <"//" (~["\n","\r"])* ("\n"|"\r"|"\r\n")>
-| <"/*" (~["*"])* "*" (~["/"] (~["*"])* "*")* "/">
-}
-
-
-/**
- * HELPER DEFINITIONS, COMMENTS, CONSTANTS, AND WHATNOT
- */
-
-TOKEN:
-{
-<tok_const: "const">|
-<tok_namespace : "namespace"> |
-<tok_cpp_namespace: "cpp_namespace">|
-<tok_cpp_include : "cpp_include">|
-<tok_cpp_type: "cpp_type">|
-<tok_java_package : "java_package">|
-<tok_cocoa_prefix: "cocoa_prefix">|
-<tok_csharp_namespace: "csharp_namespace">|
-<tok_php_namespace: "php_namespace">|
-<tok_py_module: "py_module">|
-<tok_perl_package: "perl_package">|
-<tok_ruby_namespace: "ruby_namespace">|
-<tok_smalltalk_category: "smalltalk_category">|
-<tok_smalltalk_prefix: "smalltalk_prefix">|
-<tok_xsd_all: "xsd_all">|
-<tok_xsd_optional: "xsd_optional">|
-<tok_xsd_nillable: "xsd_nillable">|
-<tok_xsd_namespace: "xsd_namespace">|
-<tok_xsd_attrs: "xsd_attrs">|
-<tok_include : "include">|
-<tok_void : "void">|
-<tok_bool : "bool">|
-<tok_byte: "byte">|
-<tok_i16: "i16">|
-<tok_i32: "i32">|
-<tok_i64: "i64">|
-<tok_double: "double">|
-<tok_string: "string">|
-<tok_slist : "slist">|
-<tok_senum: "senum">|
-<tok_map: "map"> |
-<tok_list: "list"> |
-<tok_set: "set"> |
-<tok_async: "async"> |
-<tok_typedef: "typedef"> |
-<tok_struct: "struct"> |
-<tok_exception: "exception"> |
-<tok_extends: "extends"> |
-<tok_throws: "throws"> |
-<tok_service: "service"> |
-<tok_enum: "enum"> |
-<tok_required: "required"> |
-<tok_optional: "optional"> | 
-<tok_skip: "skip">
-}
-
-TOKEN: {
-
-<tok_int_constant :  (["+","-"])?(["0"-"9"])+>
-|
-<tok_double_constant:   ["+","-"](<DIGIT>)*"."(<DIGIT>)+(["e","E"](["+","-"])?(<DIGIT>)+)?>
-|
-<IDENTIFIER: (<DIGIT>|<LETTER>|"_")(<LETTER>|<DIGIT>|"."|"_")*>
-|
-<#LETTER: (["a"-"z", "A"-"Z" ]) >
-|
-<#DIGIT: ["0"-"9"] >
-|
-<tok_literal:        "\""(~["\""])*"\""|"'"(~["'"])*"'">
-|
-<tok_st_identifier: ["a"-"z","A"-"Z","-"]([".","a"-"z","A"-"Z","_","0"-"9","-"])*>
-}
-
-
-SimpleNode Start() : {/*@bgen(jjtree) Start */
-  DynamicSerDeStart jjtn000 = new DynamicSerDeStart(JJTSTART);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Start */
-  try {
-/*@egen*/
-  HeaderList()  ([CommaOrSemicolon()] Definition())+/*@bgen(jjtree)*/
- {
-   jjtree.closeNodeScope(jjtn000, true);
-   jjtc000 = false;
- }
-/*@egen*/
- {
-    return jjtn000;
-  }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode HeaderList() : {/*@bgen(jjtree) HeaderList */
-  DynamicSerDeHeaderList jjtn000 = new DynamicSerDeHeaderList(JJTHEADERLIST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) HeaderList */
-  try {
-/*@egen*/
-  (Header())*/*@bgen(jjtree)*/
- {
-   jjtree.closeNodeScope(jjtn000, true);
-   jjtc000 = false;
- }
-/*@egen*/
- {
-    return jjtn000;
-  }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-
-}
-
-SimpleNode Header() : {/*@bgen(jjtree) Header */
-  DynamicSerDeHeader jjtn000 = new DynamicSerDeHeader(JJTHEADER);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Header */
-  try {
-/*@egen*/
-  Include()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }
-| Namespace()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode Namespace() : {/*@bgen(jjtree) Namespace */
-  DynamicSerDeNamespace jjtn000 = new DynamicSerDeNamespace(JJTNAMESPACE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Namespace */
-  try {
-/*@egen*/
-  <tok_namespace> <IDENTIFIER> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_cpp_namespace> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_cpp_include> <tok_literal>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_php_namespace> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_py_module> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_perl_package> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_ruby_namespace> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_smalltalk_category> <tok_st_identifier>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_smalltalk_prefix> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_java_package> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_cocoa_prefix> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_xsd_namespace> <tok_literal>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}
-|
-<tok_csharp_namespace> <IDENTIFIER>/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-  return jjtn000;
-}/*@bgen(jjtree)*/
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-SimpleNode Include() :  {/*@bgen(jjtree) Include */
- DynamicSerDeInclude jjtn000 = new DynamicSerDeInclude(JJTINCLUDE);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
-/*@egen*/
- String fname;
- boolean found = false;
-}
-{/*@bgen(jjtree) Include */
-   try {
-/*@egen*/
-   <tok_include>
-   fname=<tok_literal>.image/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-    // bugbug somewhat fragile below substring expression
-    fname = fname.substring(1,fname.length() - 1);
-
-    // try to find the file on the include path
-    File f = thrift_grammar.findFile(fname, this.include_path);
-    if(f != null) {
-        found = true;
-        try {
-            FileInputStream fis = new FileInputStream(f);
-            thrift_grammar t = new thrift_grammar(fis,this.include_path, false);
-            t.Start();
-            fis.close();
-            found = true;
-            // add in what we found to our type and table tables.
-            this.tables.putAll(t.tables);
-            this.types.putAll(t.types);
-        } catch (Exception e) {
-            System.out.println("File: " + fname + " - Oops.");
-            System.out.println(e.getMessage());
-            e.printStackTrace();
-        }
-    }
-    if(!found) {
-        throw new RuntimeException("include file not found: " + fname);
-    }
-    return jjtn000;
-}/*@bgen(jjtree)*/
-   } finally {
-     if (jjtc000) {
-       jjtree.closeNodeScope(jjtn000, true);
-     }
-   }
-/*@egen*/
-}
-
-
-SimpleNode Definition() : {/*@bgen(jjtree) Definition */
-  DynamicSerDeDefinition jjtn000 = new DynamicSerDeDefinition(JJTDEFINITION);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Definition */
-  try {
-/*@egen*/
-  Const()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }
-| Service()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }
-| TypeDefinition()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode TypeDefinition() : {/*@bgen(jjtree) TypeDefinition */
-  DynamicSerDeTypeDefinition jjtn000 = new DynamicSerDeTypeDefinition(JJTTYPEDEFINITION);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) TypeDefinition */
-  try {
-/*@egen*/
-  Typedef()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-   return jjtn000;
-    }
-| Enum()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-   return jjtn000;
-    }
-| Senum()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-   return jjtn000;
-    }
-| Struct()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-   return jjtn000;
-    }
-| Xception()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-   return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-
-}
-
-DynamicSerDeTypedef Typedef() : {/*@bgen(jjtree) Typedef */
-  DynamicSerDeTypedef jjtn000 = new DynamicSerDeTypedef(JJTTYPEDEF);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Typedef */
-  try {
-/*@egen*/
-  <tok_typedef>
-  DefinitionType()
-  jjtn000.name = <IDENTIFIER>.image/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-        // store the type for later retrieval
-        this.types.put(jjtn000.name, jjtn000);
-        return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-// returning void because we ignore this production.
-void CommaOrSemicolon() : {/*@bgen(jjtree) CommaOrSemicolon */
-  DynamicSerDeCommaOrSemicolon jjtn000 = new DynamicSerDeCommaOrSemicolon(JJTCOMMAORSEMICOLON);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) CommaOrSemicolon */
-  try {
-/*@egen*/
-  ","
-|
-  ";"/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{
-}/*@bgen(jjtree)*/
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode Enum() : {/*@bgen(jjtree) Enum */
-  DynamicSerDeEnum jjtn000 = new DynamicSerDeEnum(JJTENUM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Enum */
-  try {
-/*@egen*/
-  <tok_enum> <IDENTIFIER> "{" EnumDefList() "}"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode EnumDefList() : {/*@bgen(jjtree) EnumDefList */
-  DynamicSerDeEnumDefList jjtn000 = new DynamicSerDeEnumDefList(JJTENUMDEFLIST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) EnumDefList */
-  try {
-/*@egen*/
-  (EnumDef())+/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode EnumDef() : {/*@bgen(jjtree) EnumDef */
-  DynamicSerDeEnumDef jjtn000 = new DynamicSerDeEnumDef(JJTENUMDEF);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) EnumDef */
-  try {
-/*@egen*/
-  <IDENTIFIER> ["=" <tok_int_constant>] [CommaOrSemicolon()]/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode Senum() : {/*@bgen(jjtree) Senum */
-  DynamicSerDeSenum jjtn000 = new DynamicSerDeSenum(JJTSENUM);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Senum */
-  try {
-/*@egen*/
-  <tok_senum> <IDENTIFIER> "{" SenumDefList() "}"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode SenumDefList() : {/*@bgen(jjtree) SenumDefList */
-  DynamicSerDeSenumDefList jjtn000 = new DynamicSerDeSenumDefList(JJTSENUMDEFLIST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) SenumDefList */
-  try {
-/*@egen*/
-  (SenumDef())+/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode SenumDef() : {/*@bgen(jjtree) SenumDef */
-  DynamicSerDeSenumDef jjtn000 = new DynamicSerDeSenumDef(JJTSENUMDEF);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) SenumDef */
-  try {
-/*@egen*/
-  <tok_literal> [CommaOrSemicolon()]/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-SimpleNode Const() : {/*@bgen(jjtree) Const */
-  DynamicSerDeConst jjtn000 = new DynamicSerDeConst(JJTCONST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Const */
-  try {
-/*@egen*/
-  <tok_const> FieldType() <IDENTIFIER> "=" ConstValue() [CommaOrSemicolon()]/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode ConstValue() : {/*@bgen(jjtree) ConstValue */
-  DynamicSerDeConstValue jjtn000 = new DynamicSerDeConstValue(JJTCONSTVALUE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ConstValue */
-  try {
-/*@egen*/
-  <tok_int_constant>/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    }
-| <tok_double_constant>/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    }
-| <tok_literal>/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    }
-| <IDENTIFIER>/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    }
-| ConstList()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    }
-| ConstMap()/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode ConstList() : {/*@bgen(jjtree) ConstList */
-  DynamicSerDeConstList jjtn000 = new DynamicSerDeConstList(JJTCONSTLIST);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ConstList */
-  try {
-/*@egen*/
-  "[" ConstListContents() "]"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode ConstListContents() : {/*@bgen(jjtree) ConstListContents */
-  DynamicSerDeConstListContents jjtn000 = new DynamicSerDeConstListContents(JJTCONSTLISTCONTENTS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ConstListContents */
-  try {
-/*@egen*/
-  (ConstValue() [CommaOrSemicolon()])+/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode ConstMap() : {/*@bgen(jjtree) ConstMap */
-  DynamicSerDeConstMap jjtn000 = new DynamicSerDeConstMap(JJTCONSTMAP);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ConstMap */
-  try {
-/*@egen*/
-  "{" ConstMapContents() "}"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode ConstMapContents() : {/*@bgen(jjtree) ConstMapContents */
-  DynamicSerDeConstMapContents jjtn000 = new DynamicSerDeConstMapContents(JJTCONSTMAPCONTENTS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) ConstMapContents */
-  try {
-/*@egen*/
-  (ConstValue() ":" ConstValue() [CommaOrSemicolon()])+/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    }
-|/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-DynamicSerDeStruct Struct() :  {/*@bgen(jjtree) Struct */
-  DynamicSerDeStruct jjtn000 = new DynamicSerDeStruct(JJTSTRUCT);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/
-
-}
-{/*@bgen(jjtree) Struct */
-  try {
-/*@egen*/
-  <tok_struct>
-  jjtn000.name = <IDENTIFIER>.image
-  "{"
-  FieldList()
-  "}"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-   this.types.put(jjtn000.name,jjtn000);
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-SimpleNode Xception() : {/*@bgen(jjtree) Xception */
-  DynamicSerDeXception jjtn000 = new DynamicSerDeXception(JJTXCEPTION);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Xception */
-  try {
-/*@egen*/
-  <tok_exception> <IDENTIFIER> "{" FieldList() "}"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-SimpleNode Service() : {/*@bgen(jjtree) Service */
-  DynamicSerDeService jjtn000 = new DynamicSerDeService(JJTSERVICE);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Service */
-  try {
-/*@egen*/
-  <tok_service>
-  <IDENTIFIER>
-  Extends()
-  "{"
-  FlagArgs()
-  (Function())+
-  UnflagArgs()
-  "}"/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-        // at some point, these should be inserted as a "db"
-        return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-SimpleNode FlagArgs() : {/*@bgen(jjtree) FlagArgs */
-  DynamicSerDeFlagArgs jjtn000 = new DynamicSerDeFlagArgs(JJTFLAGARGS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) FlagArgs */
-    try {
-/*@egen*//*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-/*@egen*/
-}
-
-SimpleNode UnflagArgs() : {/*@bgen(jjtree) UnflagArgs */
-  DynamicSerDeUnflagArgs jjtn000 = new DynamicSerDeUnflagArgs(JJTUNFLAGARGS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) UnflagArgs */
-    try {
-/*@egen*//*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-    } finally {
-      if (jjtc000) {
-        jjtree.closeNodeScope(jjtn000, true);
-      }
-    }
-/*@egen*/
-}
-
-SimpleNode Extends() : {/*@bgen(jjtree) Extends */
-  DynamicSerDeExtends jjtn000 = new DynamicSerDeExtends(JJTEXTENDS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Extends */
-  try {
-/*@egen*/
-  <tok_extends> <IDENTIFIER>/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }
-|/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-    {
-    return jjtn000;
-    }/*@bgen(jjtree)*/
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-DynamicSerDeFunction Function() : {/*@bgen(jjtree) Function */
-  DynamicSerDeFunction jjtn000 = new DynamicSerDeFunction(JJTFUNCTION);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Function */
-  try {
-/*@egen*/
-  // metastore ignores async and type
-  Async()
-  FunctionType()
-
-  // the name of the function/table
-  jjtn000.name = <IDENTIFIER>.image
-  "("
-  FieldList()
-  ")"
-  Throws()
-  [CommaOrSemicolon()]/*@bgen(jjtree)*/
-    {
-      jjtree.closeNodeScope(jjtn000, true);
-      jjtc000 = false;
-    }
-/*@egen*/
-
-    {
-        this.tables.put(jjtn000.name, jjtn000);
-        return jjtn000;
-    }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-void Async() : {/*@bgen(jjtree) Async */
-  DynamicSerDeAsync jjtn000 = new DynamicSerDeAsync(JJTASYNC);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Async */
-  try {
-/*@egen*/
-  <tok_async>
-|/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{}/*@bgen(jjtree)*/
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-void Throws() : {/*@bgen(jjtree) Throws */
-  DynamicSerDeThrows jjtn000 = new DynamicSerDeThrows(JJTTHROWS);
-  boolean jjtc000 = true;
-  jjtree.openNodeScope(jjtn000);
-/*@egen*/}
-{/*@bgen(jjtree) Throws */
-  try {
-/*@egen*/
-  <tok_throws> "(" FieldList() ")"
-|/*@bgen(jjtree)*/
-{
-  jjtree.closeNodeScope(jjtn000, true);
-  jjtc000 = false;
-}
-/*@egen*/
-{}/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-// nothing special - just use the DynamicSerDeFieldList's children methods to access the fields
-DynamicSerDeFieldList FieldList() : {/*@bgen(jjtree) FieldList */
-   DynamicSerDeFieldList jjtn000 = new DynamicSerDeFieldList(JJTFIELDLIST);
-   boolean jjtc000 = true;
-   jjtree.openNodeScope(jjtn000);
-/*@egen*/
-   this.field_val = -1;
-}
-{/*@bgen(jjtree) FieldList */
-  try {
-/*@egen*/
-  (Field())*/*@bgen(jjtree)*/
-                {
-                  jjtree.closeNodeScope(jjtn000, true);
-                  jjtc000 = false;
-                }
-/*@egen*/    {
-    return jjtn000;
-  }/*@bgen(jjtree)*/
-  } catch (Throwable jjte000) {
-    if (jjtc000) {
-      jjtree.clearNodeScope(jjtn000);
-      jjtc000 = false;
-    } else {
-      jjtree.popNode();
-    }
-    if (jjte000 instanceof RuntimeException) {
-      throw (RuntimeException)jjte000;
-    }
-    if (jjte000 instanceof ParseException) {
-      throw (ParseException)jjte000;
-    }
-    throw (Error)jjte000;
-  } finally {
-    if (jjtc000) {
-      jjtree.closeNodeScope(jjtn000, true);
-    }
-  }
-/*@egen*/
-}
-
-
-DynamicSerDeField Field() : {/*@bgen(jjtree) Field */
- DynamicSerDeField jjtn000 = new DynamicSerDeField(JJTFIELD);
- boolean jjtc000 = true;
- jjtree.openNodeScope(jjtn000);
-/*@egen*/
-
- String fidnum = "";
- String fid;
-}
-{/*@bgen(jjtree) Field */
-  try {
-/*@egen*/
-
-  // parse the field id which is optional
-  [fidnum=<tok_int_constant>.image ":"]
-
-  // is this field required or optional? default is optional
-  FieldRequiredness()
-
-  // field type - obviously not optional
-  FieldType()
-
-   // the name of the field - not optional
-  jjtn000.name = <IDENTIFIER>.image
-
-  // does it have = some value?
-  FieldValue()
-
-  // take it or leave it
... 3576 lines suppressed ...