tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hyun...@apache.org
Subject [51/51] [partial] git commit: TAJO-22: The package prefix should be org.apache.tajo. (DaeMyung Kang via hyunsik)
Date Tue, 02 Jul 2013 14:16:45 GMT
TAJO-22: The package prefix should be org.apache.tajo. (DaeMyung Kang via hyunsik)


Project: http://git-wip-us.apache.org/repos/asf/incubator-tajo/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tajo/commit/bc6359b8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/bc6359b8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/bc6359b8

Branch: refs/heads/master
Commit: bc6359b834ebf67d212efc4fb785c186dc4d2a27
Parents: f7c171f
Author: Hyunsik Choi <hyunsik@apache.org>
Authored: Tue Jul 2 11:07:01 2013 +0900
Committer: Hyunsik Choi <hyunsik@apache.org>
Committed: Tue Jul 2 11:07:01 2013 +0900

----------------------------------------------------------------------
 CHANGES.txt                                     |    2 +
 .../org/apache/tajo/algebra/Aggregation.java    |  116 +
 .../org/apache/tajo/algebra/BinaryOperator.java |   55 +
 .../org/apache/tajo/algebra/CaseWhenExpr.java   |   88 +
 .../tajo/algebra/ColumnReferenceExpr.java       |   49 +
 .../org/apache/tajo/algebra/CreateTable.java    |  140 ++
 .../main/java/org/apache/tajo/algebra/Expr.java |   98 +
 .../java/org/apache/tajo/algebra/ExprType.java  |   99 +
 .../org/apache/tajo/algebra/FunctionExpr.java   |   45 +
 .../main/java/org/apache/tajo/algebra/Join.java |   82 +
 .../java/org/apache/tajo/algebra/JoinType.java  |   28 +
 .../org/apache/tajo/algebra/JsonHelper.java     |   57 +
 .../apache/tajo/algebra/JsonSerializable.java   |   23 +
 .../java/org/apache/tajo/algebra/LikeExpr.java  |   51 +
 .../java/org/apache/tajo/algebra/Limit.java     |   49 +
 .../org/apache/tajo/algebra/LiteralExpr.java    |   53 +
 .../org/apache/tajo/algebra/Projection.java     |   68 +
 .../java/org/apache/tajo/algebra/Relation.java  |   70 +
 .../org/apache/tajo/algebra/ScalarSubQuery.java |   41 +
 .../java/org/apache/tajo/algebra/Selection.java |   57 +
 .../org/apache/tajo/algebra/SetOperation.java   |   46 +
 .../main/java/org/apache/tajo/algebra/Sort.java |  103 +
 .../org/apache/tajo/algebra/TableSubQuery.java  |   41 +
 .../java/org/apache/tajo/algebra/Target.java    |   61 +
 .../org/apache/tajo/algebra/UnaryOperator.java  |   35 +
 .../src/main/java/tajo/algebra/Aggregation.java |  116 -
 .../main/java/tajo/algebra/BinaryOperator.java  |   55 -
 .../main/java/tajo/algebra/CaseWhenExpr.java    |   88 -
 .../java/tajo/algebra/ColumnReferenceExpr.java  |   49 -
 .../src/main/java/tajo/algebra/CreateTable.java |  140 --
 .../src/main/java/tajo/algebra/Expr.java        |   98 -
 .../src/main/java/tajo/algebra/ExprType.java    |   99 -
 .../main/java/tajo/algebra/FunctionExpr.java    |   45 -
 .../src/main/java/tajo/algebra/Join.java        |   82 -
 .../src/main/java/tajo/algebra/JoinType.java    |   28 -
 .../src/main/java/tajo/algebra/JsonHelper.java  |   57 -
 .../java/tajo/algebra/JsonSerializable.java     |   23 -
 .../src/main/java/tajo/algebra/LikeExpr.java    |   51 -
 .../src/main/java/tajo/algebra/Limit.java       |   49 -
 .../src/main/java/tajo/algebra/LiteralExpr.java |   53 -
 .../src/main/java/tajo/algebra/Projection.java  |   68 -
 .../src/main/java/tajo/algebra/Relation.java    |   70 -
 .../main/java/tajo/algebra/ScalarSubQuery.java  |   41 -
 .../src/main/java/tajo/algebra/Selection.java   |   57 -
 .../main/java/tajo/algebra/SetOperation.java    |   46 -
 .../src/main/java/tajo/algebra/Sort.java        |  103 -
 .../main/java/tajo/algebra/TableSubQuery.java   |   41 -
 .../src/main/java/tajo/algebra/Target.java      |   61 -
 .../main/java/tajo/algebra/UnaryOperator.java   |   35 -
 .../apache/tajo/algebra/AlgebraTestingUtil.java |   31 +
 .../java/org/apache/tajo/algebra/TestExpr.java  |  142 ++
 .../java/tajo/algebra/AlgebraTestingUtil.java   |   31 -
 .../src/test/java/tajo/algebra/TestExpr.java    |  142 --
 .../tajo/catalog/AbstractCatalogClient.java     |  261 ++
 .../org/apache/tajo/catalog/CatalogClient.java  |   68 +
 .../org/apache/tajo/catalog/CatalogService.java |   96 +
 .../tajo/catalog/AbstractCatalogClient.java     |  261 --
 .../main/java/tajo/catalog/CatalogClient.java   |   68 -
 .../main/java/tajo/catalog/CatalogService.java  |   96 -
 .../src/main/proto/CatalogProtocol.proto        |    2 +-
 .../src/main/proto/CatalogProtos.proto          |    2 +-
 .../src/main/proto/DataTypes.proto              |    2 +-
 .../src/main/proto/PrimitiveProtos.proto        |    2 +-
 .../src/main/resources/catalog-default.xml      |    2 +-
 .../catalog/AlreadyRegisteredURIException.java  |   40 +
 .../org/apache/tajo/catalog/AttributeType.java  |   25 +
 .../apache/tajo/catalog/CatalogConstants.java   |   30 +
 .../org/apache/tajo/catalog/CatalogUtil.java    |  181 ++
 .../java/org/apache/tajo/catalog/Column.java    |  187 ++
 .../org/apache/tajo/catalog/FunctionDesc.java   |  274 +++
 .../java/org/apache/tajo/catalog/IndexDesc.java |  265 +++
 .../java/org/apache/tajo/catalog/Options.java   |  180 ++
 .../java/org/apache/tajo/catalog/Schema.java    |  253 ++
 .../org/apache/tajo/catalog/SchemaObject.java   |   23 +
 .../java/org/apache/tajo/catalog/SortSpec.java  |   86 +
 .../java/org/apache/tajo/catalog/TableDesc.java |   44 +
 .../org/apache/tajo/catalog/TableDescImpl.java  |  214 ++
 .../java/org/apache/tajo/catalog/TableMeta.java |   54 +
 .../org/apache/tajo/catalog/TableMetaImpl.java  |  280 +++
 .../java/org/apache/tajo/catalog/TableUtil.java |   51 +
 .../exception/AlreadyExistsFieldException.java  |   30 +
 .../AlreadyExistsFunctionException.java         |   27 +
 .../exception/AlreadyExistsIndexException.java  |   51 +
 .../exception/AlreadyExistsTableException.java  |   31 +
 .../catalog/exception/CatalogException.java     |   51 +
 .../exception/InvalidTableException.java        |   36 +
 .../exception/NoSuchFunctionException.java      |   29 +
 .../catalog/exception/NoSuchIndexException.java |   51 +
 .../catalog/exception/NoSuchTableException.java |   30 +
 .../tajo/catalog/function/AggFunction.java      |   52 +
 .../apache/tajo/catalog/function/Function.java  |   62 +
 .../tajo/catalog/function/FunctionContext.java  |   22 +
 .../tajo/catalog/function/GeneralFunction.java  |   43 +
 .../tajo/catalog/json/FunctionAdapter.java      |   54 +
 .../apache/tajo/catalog/json/GsonCreator.java   |   72 +
 .../tajo/catalog/json/PathDeserializer.java     |   37 +
 .../tajo/catalog/json/PathSerializer.java       |   37 +
 .../tajo/catalog/json/TableDescAdapter.java     |   59 +
 .../tajo/catalog/json/TableMetaAdapter.java     |   56 +
 .../tajo/catalog/statistics/ColumnStat.java     |  246 ++
 .../apache/tajo/catalog/statistics/Stat.java    |  107 +
 .../apache/tajo/catalog/statistics/StatSet.java |  151 ++
 .../tajo/catalog/statistics/StatisticsUtil.java |  104 +
 .../tajo/catalog/statistics/TableStat.java      |  285 +++
 .../tajo/catalog/statistics/TupleUtil.java      |   50 +
 .../catalog/AlreadyRegisteredURIException.java  |   40 -
 .../main/java/tajo/catalog/AttributeType.java   |   25 -
 .../java/tajo/catalog/CatalogConstants.java     |   30 -
 .../src/main/java/tajo/catalog/CatalogUtil.java |  181 --
 .../src/main/java/tajo/catalog/Column.java      |  187 --
 .../main/java/tajo/catalog/FunctionDesc.java    |  274 ---
 .../src/main/java/tajo/catalog/IndexDesc.java   |  265 ---
 .../src/main/java/tajo/catalog/Options.java     |  180 --
 .../src/main/java/tajo/catalog/Schema.java      |  253 --
 .../main/java/tajo/catalog/SchemaObject.java    |   23 -
 .../src/main/java/tajo/catalog/SortSpec.java    |   86 -
 .../src/main/java/tajo/catalog/TableDesc.java   |   44 -
 .../main/java/tajo/catalog/TableDescImpl.java   |  214 --
 .../src/main/java/tajo/catalog/TableMeta.java   |   54 -
 .../main/java/tajo/catalog/TableMetaImpl.java   |  280 ---
 .../src/main/java/tajo/catalog/TableUtil.java   |   51 -
 .../exception/AlreadyExistsFieldException.java  |   30 -
 .../AlreadyExistsFunctionException.java         |   27 -
 .../exception/AlreadyExistsIndexException.java  |   51 -
 .../exception/AlreadyExistsTableException.java  |   31 -
 .../catalog/exception/CatalogException.java     |   51 -
 .../exception/InvalidTableException.java        |   36 -
 .../exception/NoSuchFunctionException.java      |   29 -
 .../catalog/exception/NoSuchIndexException.java |   51 -
 .../catalog/exception/NoSuchTableException.java |   30 -
 .../java/tajo/catalog/function/AggFunction.java |   52 -
 .../java/tajo/catalog/function/Function.java    |   62 -
 .../tajo/catalog/function/FunctionContext.java  |   22 -
 .../tajo/catalog/function/GeneralFunction.java  |   43 -
 .../java/tajo/catalog/json/FunctionAdapter.java |   54 -
 .../java/tajo/catalog/json/GsonCreator.java     |   72 -
 .../tajo/catalog/json/PathDeserializer.java     |   37 -
 .../java/tajo/catalog/json/PathSerializer.java  |   37 -
 .../tajo/catalog/json/TableDescAdapter.java     |   59 -
 .../tajo/catalog/json/TableMetaAdapter.java     |   56 -
 .../tajo/catalog/statistics/ColumnStat.java     |  246 --
 .../main/java/tajo/catalog/statistics/Stat.java |  107 -
 .../java/tajo/catalog/statistics/StatSet.java   |  151 --
 .../tajo/catalog/statistics/StatisticsUtil.java |  104 -
 .../java/tajo/catalog/statistics/TableStat.java |  285 ---
 .../java/tajo/catalog/statistics/TupleUtil.java |   50 -
 .../src/main/proto/CatalogProtos.proto          |    2 +-
 .../src/main/proto/DataTypes.proto              |    2 +-
 .../apache/tajo/catalog/TestCatalogUtil.java    |   33 +
 .../org/apache/tajo/catalog/TestColumn.java     |   96 +
 .../apache/tajo/catalog/TestFunctionDesc.java   |  126 +
 .../org/apache/tajo/catalog/TestIndexDesc.java  |   96 +
 .../org/apache/tajo/catalog/TestOptions.java    |   63 +
 .../org/apache/tajo/catalog/TestSchema.java     |  133 ++
 .../org/apache/tajo/catalog/TestTableDesc.java  |   99 +
 .../org/apache/tajo/catalog/TestTableInfo.java  |  129 +
 .../org/apache/tajo/catalog/TestTableMeta.java  |  127 +
 .../tajo/catalog/statistics/TestColumnStat.java |   68 +
 .../tajo/catalog/statistics/TestStatSet.java    |   67 +
 .../catalog/statistics/TestStatisticsUtil.java  |   68 +
 .../tajo/catalog/statistics/TestTableStat.java  |   74 +
 .../test/java/tajo/catalog/TestCatalogUtil.java |   33 -
 .../src/test/java/tajo/catalog/TestColumn.java  |   96 -
 .../java/tajo/catalog/TestFunctionDesc.java     |  126 -
 .../test/java/tajo/catalog/TestIndexDesc.java   |   96 -
 .../src/test/java/tajo/catalog/TestOptions.java |   63 -
 .../src/test/java/tajo/catalog/TestSchema.java  |  133 --
 .../test/java/tajo/catalog/TestTableDesc.java   |   99 -
 .../test/java/tajo/catalog/TestTableInfo.java   |  129 -
 .../test/java/tajo/catalog/TestTableMeta.java   |  127 -
 .../tajo/catalog/statistics/TestColumnStat.java |   68 -
 .../tajo/catalog/statistics/TestStatSet.java    |   67 -
 .../catalog/statistics/TestStatisticsUtil.java  |   68 -
 .../tajo/catalog/statistics/TestTableStat.java  |   74 -
 .../org/apache/tajo/catalog/CatalogServer.java  |  470 ++++
 .../org/apache/tajo/catalog/LocalCatalog.java   |   53 +
 .../apache/tajo/catalog/MiniCatalogServer.java  |   45 +
 .../apache/tajo/catalog/store/CatalogStore.java |   62 +
 .../org/apache/tajo/catalog/store/DBStore.java  | 1033 ++++++++
 .../org/apache/tajo/catalog/store/MemStore.java |  207 ++
 .../main/java/tajo/catalog/CatalogServer.java   |  470 ----
 .../main/java/tajo/catalog/LocalCatalog.java    |   53 -
 .../java/tajo/catalog/MiniCatalogServer.java    |   45 -
 .../java/tajo/catalog/store/CatalogStore.java   |   62 -
 .../main/java/tajo/catalog/store/DBStore.java   | 1033 --------
 .../main/java/tajo/catalog/store/MemStore.java  |  207 --
 .../src/main/resources/catalog-default.xml      |    2 +-
 .../org/apache/tajo/catalog/TestCatalog.java    |  214 ++
 .../org/apache/tajo/catalog/TestDBStore.java    |  220 ++
 .../tajo/catalog/statistics/TestColumnStat.java |   68 +
 .../tajo/catalog/statistics/TestStatSet.java    |   67 +
 .../catalog/statistics/TestStatisticsUtil.java  |   68 +
 .../tajo/catalog/statistics/TestTableStat.java  |   74 +
 .../src/test/java/tajo/catalog/TestCatalog.java |  214 --
 .../src/test/java/tajo/catalog/TestDBStore.java |  220 --
 .../tajo/catalog/statistics/TestColumnStat.java |   68 -
 .../tajo/catalog/statistics/TestStatSet.java    |   67 -
 .../catalog/statistics/TestStatisticsUtil.java  |   68 -
 .../tajo/catalog/statistics/TestTableStat.java  |   74 -
 .../src/test/resources/catalog-default.xml      |    2 +-
 .../src/main/java/org/apache/tajo/QueryId.java  |  187 ++
 .../java/org/apache/tajo/QueryIdFactory.java    |   56 +
 .../org/apache/tajo/QueryUnitAttemptId.java     |  172 ++
 .../main/java/org/apache/tajo/QueryUnitId.java  |  177 ++
 .../main/java/org/apache/tajo/SubQueryId.java   |  166 ++
 .../java/org/apache/tajo/TajoConstants.java     |   28 +
 .../org/apache/tajo/common/ProtoObject.java     |   26 +
 .../java/org/apache/tajo/common/Sleeper.java    |   42 +
 .../exception/InvalidAddressException.java      |   25 +
 .../exception/NotImplementedException.java      |   49 +
 .../java/org/apache/tajo/common/type/IPv4.java  |  181 ++
 .../org/apache/tajo/common/type/TimeRange.java  |   80 +
 .../java/org/apache/tajo/conf/TajoConf.java     |  351 +++
 .../java/org/apache/tajo/datum/ArrayDatum.java  |   81 +
 .../java/org/apache/tajo/datum/BitDatum.java    |  134 ++
 .../java/org/apache/tajo/datum/BlobDatum.java   |  163 ++
 .../org/apache/tajo/datum/BooleanDatum.java     |  173 ++
 .../java/org/apache/tajo/datum/CharDatum.java   |  141 ++
 .../main/java/org/apache/tajo/datum/Datum.java  |  158 ++
 .../org/apache/tajo/datum/DatumFactory.java     |  130 +
 .../java/org/apache/tajo/datum/Float4Datum.java |  279 +++
 .../java/org/apache/tajo/datum/Float8Datum.java |  271 +++
 .../java/org/apache/tajo/datum/Inet4Datum.java  |  138 ++
 .../java/org/apache/tajo/datum/Int2Datum.java   |  269 +++
 .../java/org/apache/tajo/datum/Int4Datum.java   |  274 +++
 .../java/org/apache/tajo/datum/Int8Datum.java   |  280 +++
 .../java/org/apache/tajo/datum/NullDatum.java   |  109 +
 .../org/apache/tajo/datum/NumericDatum.java     |   39 +
 .../java/org/apache/tajo/datum/TextDatum.java   |  146 ++
 .../datum/exception/InvalidCastException.java   |   33 +
 .../exception/InvalidOperationException.java    |   42 +
 .../apache/tajo/datum/json/DatumAdapter.java    |   55 +
 .../org/apache/tajo/datum/json/GsonCreator.java |   44 +
 .../tajo/exception/InternalException.java       |   43 +
 .../tajo/exception/UnimplementedException.java  |   38 +
 .../tajo/exception/UnsupportedException.java    |   38 +
 .../apache/tajo/gson/ClassNameDeserializer.java |   44 +
 .../apache/tajo/gson/ClassNameSerializer.java   |   39 +
 .../org/apache/tajo/gson/DataTypeAdapter.java   |   64 +
 .../org/apache/tajo/gson/DatumTypeAdapter.java  |   55 +
 .../org/apache/tajo/gson/PathDeserializer.java  |   40 +
 .../org/apache/tajo/gson/PathSerializer.java    |   40 +
 .../java/org/apache/tajo/storage/Tuple.java     |   78 +
 .../java/org/apache/tajo/unit/StorageUnit.java  |   29 +
 .../java/org/apache/tajo/unit/TimeUnit.java     |   29 +
 .../java/org/apache/tajo/util/BitArray.java     |   99 +
 .../main/java/org/apache/tajo/util/Bytes.java   | 1624 +++++++++++++
 .../org/apache/tajo/util/CommonTestingUtil.java |   57 +
 .../java/org/apache/tajo/util/FileUtil.java     |   93 +
 .../main/java/org/apache/tajo/util/JarUtil.java |   64 +
 .../java/org/apache/tajo/util/NumberUtil.java   |   30 +
 .../org/apache/tajo/util/ReflectionUtil.java    |   39 +
 .../main/java/org/apache/tajo/util/TUtil.java   |  104 +
 .../java/org/apache/tajo/util/TajoIdUtils.java  |   83 +
 tajo-common/src/main/java/tajo/QueryId.java     |  187 --
 .../src/main/java/tajo/QueryIdFactory.java      |   56 -
 .../src/main/java/tajo/QueryUnitAttemptId.java  |  172 --
 tajo-common/src/main/java/tajo/QueryUnitId.java |  177 --
 tajo-common/src/main/java/tajo/SubQueryId.java  |  166 --
 .../src/main/java/tajo/TajoConstants.java       |   28 -
 .../src/main/java/tajo/common/ProtoObject.java  |   26 -
 .../src/main/java/tajo/common/Sleeper.java      |   42 -
 .../exception/InvalidAddressException.java      |   25 -
 .../exception/NotImplementedException.java      |   49 -
 .../src/main/java/tajo/common/type/IPv4.java    |  181 --
 .../main/java/tajo/common/type/TimeRange.java   |   80 -
 .../src/main/java/tajo/conf/TajoConf.java       |  351 ---
 .../src/main/java/tajo/datum/ArrayDatum.java    |   81 -
 .../src/main/java/tajo/datum/BitDatum.java      |  134 --
 .../src/main/java/tajo/datum/BlobDatum.java     |  163 --
 .../src/main/java/tajo/datum/BooleanDatum.java  |  173 --
 .../src/main/java/tajo/datum/CharDatum.java     |  141 --
 tajo-common/src/main/java/tajo/datum/Datum.java |  158 --
 .../src/main/java/tajo/datum/DatumFactory.java  |  130 -
 .../src/main/java/tajo/datum/Float4Datum.java   |  279 ---
 .../src/main/java/tajo/datum/Float8Datum.java   |  271 ---
 .../src/main/java/tajo/datum/Inet4Datum.java    |  138 --
 .../src/main/java/tajo/datum/Int2Datum.java     |  269 ---
 .../src/main/java/tajo/datum/Int4Datum.java     |  274 ---
 .../src/main/java/tajo/datum/Int8Datum.java     |  280 ---
 .../src/main/java/tajo/datum/NullDatum.java     |  109 -
 .../src/main/java/tajo/datum/NumericDatum.java  |   39 -
 .../src/main/java/tajo/datum/TextDatum.java     |  146 --
 .../datum/exception/InvalidCastException.java   |   33 -
 .../exception/InvalidOperationException.java    |   42 -
 .../main/java/tajo/datum/json/DatumAdapter.java |   55 -
 .../main/java/tajo/datum/json/GsonCreator.java  |   44 -
 .../java/tajo/exception/InternalException.java  |   43 -
 .../tajo/exception/UnimplementedException.java  |   38 -
 .../tajo/exception/UnsupportedException.java    |   38 -
 .../java/tajo/gson/ClassNameDeserializer.java   |   44 -
 .../java/tajo/gson/ClassNameSerializer.java     |   39 -
 .../main/java/tajo/gson/DataTypeAdapter.java    |   64 -
 .../main/java/tajo/gson/DatumTypeAdapter.java   |   55 -
 .../main/java/tajo/gson/PathDeserializer.java   |   40 -
 .../src/main/java/tajo/gson/PathSerializer.java |   40 -
 .../src/main/java/tajo/storage/Tuple.java       |   78 -
 .../src/main/java/tajo/unit/StorageUnit.java    |   29 -
 .../src/main/java/tajo/unit/TimeUnit.java       |   29 -
 .../src/main/java/tajo/util/BitArray.java       |   99 -
 tajo-common/src/main/java/tajo/util/Bytes.java  | 1624 -------------
 .../main/java/tajo/util/CommonTestingUtil.java  |   57 -
 .../src/main/java/tajo/util/FileUtil.java       |   93 -
 .../src/main/java/tajo/util/JarUtil.java        |   64 -
 .../src/main/java/tajo/util/NumberUtil.java     |   30 -
 .../src/main/java/tajo/util/ReflectionUtil.java |   39 -
 tajo-common/src/main/java/tajo/util/TUtil.java  |  104 -
 .../src/main/java/tajo/util/TajoIdUtils.java    |   83 -
 tajo-common/src/main/proto/DataTypes.proto      |    2 +-
 tajo-common/src/main/proto/TajoIdProtos.proto   |    2 +-
 tajo-common/src/main/proto/TestProtos.proto     |    2 +-
 .../org/apache/tajo/common/type/TestIPv4.java   |   84 +
 .../apache/tajo/common/type/TestTimeRange.java  |   57 +
 .../org/apache/tajo/datum/TestBitDatum.java     |   76 +
 .../org/apache/tajo/datum/TestBoolDatum.java    |   75 +
 .../org/apache/tajo/datum/TestBytesDatum.java   |   55 +
 .../org/apache/tajo/datum/TestCharDatum.java    |   87 +
 .../java/org/apache/tajo/datum/TestDatum.java   |  314 +++
 .../org/apache/tajo/datum/TestDatumFactory.java |   75 +
 .../org/apache/tajo/datum/TestFloat8Datum.java  |   70 +
 .../org/apache/tajo/datum/TestFloatDatum.java   |   70 +
 .../org/apache/tajo/datum/TestInet4Datum.java   |   75 +
 .../org/apache/tajo/datum/TestInt2Datum.java    |   70 +
 .../org/apache/tajo/datum/TestInt4Datum.java    |   70 +
 .../org/apache/tajo/datum/TestInt8Datum.java    |   70 +
 .../org/apache/tajo/datum/TestTextDatum.java    |   70 +
 .../org/apache/tajo/util/TestBitArrayTest.java  |   39 +
 .../org/apache/tajo/util/TestFileUtils.java     |  107 +
 .../test/java/tajo/common/type/TestIPv4.java    |   84 -
 .../java/tajo/common/type/TestTimeRange.java    |   57 -
 .../src/test/java/tajo/datum/TestBitDatum.java  |   76 -
 .../src/test/java/tajo/datum/TestBoolDatum.java |   75 -
 .../test/java/tajo/datum/TestBytesDatum.java    |   55 -
 .../src/test/java/tajo/datum/TestCharDatum.java |   87 -
 .../src/test/java/tajo/datum/TestDatum.java     |  314 ---
 .../test/java/tajo/datum/TestDatumFactory.java  |   75 -
 .../test/java/tajo/datum/TestFloat8Datum.java   |   70 -
 .../test/java/tajo/datum/TestFloatDatum.java    |   70 -
 .../test/java/tajo/datum/TestInet4Datum.java    |   75 -
 .../src/test/java/tajo/datum/TestInt2Datum.java |   70 -
 .../src/test/java/tajo/datum/TestInt4Datum.java |   70 -
 .../src/test/java/tajo/datum/TestInt8Datum.java |   70 -
 .../src/test/java/tajo/datum/TestTextDatum.java |   70 -
 .../test/java/tajo/util/TestBitArrayTest.java   |   39 -
 .../src/test/java/tajo/util/TestFileUtils.java  |  107 -
 tajo-core/tajo-core-backend/pom.xml             |    4 +-
 .../org/apache/tajo/engine/parser/SQLLexer.g    |  376 +++
 .../org/apache/tajo/engine/parser/SQLParser.g   |  766 ++++++
 .../main/antlr3/tajo/engine/parser/SQLLexer.g   |  376 ---
 .../main/antlr3/tajo/engine/parser/SQLParser.g  |  766 ------
 .../src/main/findbugs/findbugs-exclude.xml      |    2 +-
 .../main/java/org/apache/tajo/QueryConf.java    |   64 +
 .../org/apache/tajo/TaskAttemptContext.java     |  212 ++
 .../org/apache/tajo/benchmark/BenchmarkSet.java |  111 +
 .../java/org/apache/tajo/benchmark/Driver.java  |   46 +
 .../org/apache/tajo/benchmark/SimpleQuery.java  |   29 +
 .../java/org/apache/tajo/benchmark/TPCH.java    |  171 ++
 .../main/java/org/apache/tajo/cli/TajoCli.java  |  382 +++
 .../org/apache/tajo/client/QueryStatus.java     |   79 +
 .../org/apache/tajo/client/ResultSetUtil.java   |   49 +
 .../java/org/apache/tajo/client/TajoClient.java |  297 +++
 .../tajo/engine/eval/AggFuncCallEval.java       |  111 +
 .../tajo/engine/eval/AlgebraicException.java    |   41 +
 .../apache/tajo/engine/eval/AlgebraicUtil.java  |  289 +++
 .../org/apache/tajo/engine/eval/BinaryEval.java |  234 ++
 .../apache/tajo/engine/eval/CaseWhenEval.java   |  238 ++
 .../org/apache/tajo/engine/eval/ConstEval.java  |  125 +
 .../apache/tajo/engine/eval/EvalContext.java    |   22 +
 .../org/apache/tajo/engine/eval/EvalNode.java   |  155 ++
 .../tajo/engine/eval/EvalNodeVisitor.java       |   23 +
 .../tajo/engine/eval/EvalTreeFactory.java       |   32 +
 .../apache/tajo/engine/eval/EvalTreeUtil.java   |  353 +++
 .../org/apache/tajo/engine/eval/FieldEval.java  |  147 ++
 .../apache/tajo/engine/eval/FuncCallEval.java   |   98 +
 .../org/apache/tajo/engine/eval/FuncEval.java   |  142 ++
 .../tajo/engine/eval/InvalidCastException.java  |   36 +
 .../tajo/engine/eval/InvalidEvalException.java  |   36 +
 .../org/apache/tajo/engine/eval/IsNullEval.java |  113 +
 .../org/apache/tajo/engine/eval/LikeEval.java   |   96 +
 .../org/apache/tajo/engine/eval/NotEval.java    |  117 +
 .../tajo/engine/eval/PartialBinaryExpr.java     |   82 +
 .../engine/exception/EmptyClusterException.java |   34 +
 .../exception/IllegalQueryStatusException.java  |   38 +
 .../engine/exception/NTAQueryException.java     |   42 +
 .../exception/NoSuchQueryIdException.java       |   43 +
 .../exception/UnfinishedTaskException.java      |   35 +
 .../exception/UnknownWorkerException.java       |   44 +
 .../apache/tajo/engine/function/Country.java    |   40 +
 .../apache/tajo/engine/function/InCountry.java  |   44 +
 .../tajo/engine/function/builtin/AvgDouble.java |   86 +
 .../tajo/engine/function/builtin/AvgFloat.java  |   85 +
 .../tajo/engine/function/builtin/AvgInt.java    |   85 +
 .../tajo/engine/function/builtin/AvgLong.java   |   85 +
 .../tajo/engine/function/builtin/CountRows.java |   75 +
 .../engine/function/builtin/CountValue.java     |   40 +
 .../tajo/engine/function/builtin/Date.java      |   53 +
 .../tajo/engine/function/builtin/MaxDouble.java |   69 +
 .../tajo/engine/function/builtin/MaxFloat.java  |   67 +
 .../tajo/engine/function/builtin/MaxInt.java    |   68 +
 .../tajo/engine/function/builtin/MaxLong.java   |   68 +
 .../tajo/engine/function/builtin/MinDouble.java |   68 +
 .../tajo/engine/function/builtin/MinFloat.java  |   69 +
 .../tajo/engine/function/builtin/MinInt.java    |   68 +
 .../tajo/engine/function/builtin/MinLong.java   |   69 +
 .../tajo/engine/function/builtin/MinString.java |   73 +
 .../tajo/engine/function/builtin/RandomInt.java |   45 +
 .../tajo/engine/function/builtin/SumDouble.java |   68 +
 .../tajo/engine/function/builtin/SumFloat.java  |   66 +
 .../tajo/engine/function/builtin/SumInt.java    |   68 +
 .../tajo/engine/function/builtin/SumLong.java   |   68 +
 .../tajo/engine/function/builtin/Today.java     |   38 +
 .../tajo/engine/json/EvalNodeAdapter.java       |   55 +
 .../tajo/engine/json/FragmentDeserializer.java  |   54 +
 .../tajo/engine/json/FromTableDeserializer.java |   50 +
 .../apache/tajo/engine/json/GsonCreator.java    |   81 +
 .../tajo/engine/json/LogicalNodeAdapter.java    |   58 +
 .../apache/tajo/engine/parser/CommandType.java  |   41 +
 .../org/apache/tajo/engine/parser/CopyStmt.java |   72 +
 .../tajo/engine/parser/CreateIndexStmt.java     |  107 +
 .../tajo/engine/parser/CreateTableStmt.java     |  128 +
 .../apache/tajo/engine/parser/ParseTree.java    |   63 +
 .../apache/tajo/engine/parser/ParseUtil.java    |   76 +
 .../tajo/engine/parser/ParserException.java     |   54 +
 .../tajo/engine/parser/QueryAnalyzer.java       | 1336 +++++++++++
 .../apache/tajo/engine/parser/QueryBlock.java   |  586 +++++
 .../org/apache/tajo/engine/parser/SetStmt.java  |   60 +
 .../tajo/engine/parser/StatementType.java       |   53 +
 .../org/apache/tajo/engine/parser/TableMap.java |   68 +
 .../apache/tajo/engine/planner/JoinType.java    |   28 +
 .../tajo/engine/planner/LogicalOptimizer.java   |  742 ++++++
 .../tajo/engine/planner/LogicalPlanner.java     |  687 ++++++
 .../tajo/engine/planner/PhysicalPlanner.java    |   36 +
 .../engine/planner/PhysicalPlannerImpl.java     |  321 +++
 .../apache/tajo/engine/planner/PlannerUtil.java |  616 +++++
 .../tajo/engine/planner/PlanningContext.java    |   40 +
 .../engine/planner/PlanningContextImpl.java     |   94 +
 .../apache/tajo/engine/planner/Projector.java   |  114 +
 .../engine/planner/RangeOverflowException.java  |   28 +
 .../engine/planner/RangePartitionAlgorithm.java |  127 +
 .../engine/planner/UniformRangePartition.java   |  331 +++
 .../engine/planner/global/GlobalOptimizer.java  |   80 +
 .../tajo/engine/planner/global/MasterPlan.java  |   49 +
 .../tajo/engine/planner/logical/BinaryNode.java |   86 +
 .../engine/planner/logical/CreateTableNode.java |  148 ++
 .../engine/planner/logical/EvalExprNode.java    |   75 +
 .../tajo/engine/planner/logical/ExceptNode.java |   46 +
 .../tajo/engine/planner/logical/ExprType.java   |   51 +
 .../engine/planner/logical/GroupbyNode.java     |  152 ++
 .../engine/planner/logical/IndexScanNode.java   |  131 ++
 .../engine/planner/logical/IndexWriteNode.java  |   95 +
 .../engine/planner/logical/IntersectNode.java   |   46 +
 .../tajo/engine/planner/logical/JoinNode.java   |  110 +
 .../tajo/engine/planner/logical/LimitNode.java  |   74 +
 .../engine/planner/logical/LogicalNode.java     |  110 +
 .../planner/logical/LogicalNodeVisitor.java     |   27 +
 .../engine/planner/logical/LogicalRootNode.java |   54 +
 .../engine/planner/logical/ProjectionNode.java  |  106 +
 .../tajo/engine/planner/logical/ScanNode.java   |  193 ++
 .../engine/planner/logical/SelectionNode.java   |   80 +
 .../tajo/engine/planner/logical/SortNode.java   |   97 +
 .../engine/planner/logical/StoreIndexNode.java  |   27 +
 .../engine/planner/logical/StoreTableNode.java  |  166 ++
 .../tajo/engine/planner/logical/UnaryNode.java  |   73 +
 .../tajo/engine/planner/logical/UnionNode.java  |   46 +
 .../planner/logical/extended/PipeType.java      |   24 +
 .../planner/logical/extended/ReceiveNode.java   |  128 +
 .../logical/extended/RepartitionType.java       |   25 +
 .../planner/logical/extended/SendNode.java      |  152 ++
 .../tajo/engine/planner/logical/join/Edge.java  |   50 +
 .../engine/planner/logical/join/JoinTree.java   |   95 +
 .../planner/physical/AggregationExec.java       |   96 +
 .../engine/planner/physical/BNLJoinExec.java    |  197 ++
 .../planner/physical/BSTIndexScanExec.java      |  142 ++
 .../planner/physical/BinaryPhysicalExec.java    |   63 +
 .../engine/planner/physical/EvalExprExec.java   |   69 +
 .../planner/physical/ExternalSortExec.java      |  221 ++
 .../planner/physical/HashAggregateExec.java     |  108 +
 .../engine/planner/physical/HashJoinExec.java   |  196 ++
 .../planner/physical/HashPartitioner.java       |   44 +
 .../engine/planner/physical/IndexWriteExec.java |   88 +
 .../planner/physical/IndexedStoreExec.java      |  118 +
 .../planner/physical/JoinTupleComparator.java   |   87 +
 .../tajo/engine/planner/physical/LimitExec.java |   55 +
 .../engine/planner/physical/MemSortExec.java    |   81 +
 .../engine/planner/physical/MergeJoinExec.java  |  181 ++
 .../engine/planner/physical/NLJoinExec.java     |  108 +
 .../planner/physical/PartitionedStoreExec.java  |  153 ++
 .../engine/planner/physical/Partitioner.java    |   43 +
 .../engine/planner/physical/PhysicalExec.java   |   51 +
 .../engine/planner/physical/ProjectionExec.java |   66 +
 .../engine/planner/physical/SelectionExec.java  |   70 +
 .../engine/planner/physical/SeqScanExec.java    |  113 +
 .../planner/physical/SortAggregateExec.java     |   99 +
 .../tajo/engine/planner/physical/SortExec.java  |   51 +
 .../engine/planner/physical/StoreTableExec.java |  108 +
 .../engine/planner/physical/TunnelExec.java     |   42 +
 .../planner/physical/UnaryPhysicalExec.java     |   57 +
 .../tajo/engine/planner/physical/UnionExec.java |   62 +
 .../tajo/engine/query/QueryUnitRequestImpl.java |  304 +++
 .../apache/tajo/engine/query/ResultSetImpl.java | 2222 ++++++++++++++++++
 .../engine/query/ResultSetMetaDataImpl.java     |  259 ++
 .../exception/AmbiguousFieldException.java      |   30 +
 .../query/exception/InvalidQueryException.java  |   35 +
 .../exception/NotSupportQueryException.java     |   34 +
 .../engine/query/exception/TQLParseError.java   |   27 +
 .../engine/query/exception/TQLSyntaxError.java  |   45 +
 .../exception/UndefinedFunctionException.java   |   34 +
 .../org/apache/tajo/engine/utils/ProtoUtil.java |   29 +
 .../apache/tajo/engine/utils/SchemaUtil.java    |   97 +
 .../apache/tajo/engine/utils/ThreadUtil.java    |  149 ++
 .../org/apache/tajo/engine/utils/TupleUtil.java |  388 +++
 .../ipc/protocolrecords/QueryUnitRequest.java   |   46 +
 .../org/apache/tajo/master/ClientService.java   |  433 ++++
 .../org/apache/tajo/master/ExecutionBlock.java  |  181 ++
 .../tajo/master/ExecutionBlockCursor.java       |   80 +
 .../org/apache/tajo/master/GlobalEngine.java    |  333 +++
 .../org/apache/tajo/master/GlobalPlanner.java   |  721 ++++++
 .../apache/tajo/master/GlobalPlannerUtils.java  |  197 ++
 .../main/java/org/apache/tajo/master/Query.java |  432 ++++
 .../org/apache/tajo/master/QueryMaster.java     |  465 ++++
 .../java/org/apache/tajo/master/QueryUnit.java  |  502 ++++
 .../apache/tajo/master/QueryUnitAttempt.java    |  344 +++
 .../org/apache/tajo/master/Repartitioner.java   |  582 +++++
 .../java/org/apache/tajo/master/SubQuery.java   |  766 ++++++
 .../org/apache/tajo/master/SubQueryState.java   |   28 +
 .../java/org/apache/tajo/master/TajoMaster.java |  391 +++
 .../tajo/master/TaskRunnerGroupEvent.java       |   47 +
 .../apache/tajo/master/TaskRunnerLauncher.java  |   25 +
 .../tajo/master/TaskRunnerLauncherImpl.java     |  540 +++++
 .../apache/tajo/master/TaskRunnerListener.java  |  172 ++
 .../org/apache/tajo/master/TaskScheduler.java   |   26 +
 .../apache/tajo/master/TaskSchedulerImpl.java   |  420 ++++
 .../java/org/apache/tajo/master/TaskState.java  |   23 +
 .../apache/tajo/master/cluster/ServerName.java  |  123 +
 .../tajo/master/cluster/WorkerListener.java     |  148 ++
 .../master/event/ContainerAllocationEvent.java  |   73 +
 .../event/ContainerAllocatorEventType.java      |   26 +
 .../tajo/master/event/ContainerEvent.java       |   37 +
 .../event/GrouppedContainerAllocatorEvent.java  |   45 +
 .../event/QueryDiagnosticsUpdateEvent.java      |   34 +
 .../apache/tajo/master/event/QueryEvent.java    |   36 +
 .../tajo/master/event/QueryEventType.java       |   29 +
 .../tajo/master/event/QueryFinishEvent.java     |   39 +
 .../tajo/master/event/QuerySubQueryEvent.java   |   35 +
 .../master/event/SubQueryCompletedEvent.java    |   42 +
 .../event/SubQueryContainerAllocationEvent.java |   38 +
 .../apache/tajo/master/event/SubQueryEvent.java |   35 +
 .../tajo/master/event/SubQueryEventType.java    |   39 +
 .../tajo/master/event/SubQuerySucceeEvent.java  |   36 +
 .../tajo/master/event/SubQueryTaskEvent.java    |   37 +
 .../master/event/TaskAttemptAssignedEvent.java  |   48 +
 .../tajo/master/event/TaskAttemptEvent.java     |   36 +
 .../tajo/master/event/TaskAttemptEventType.java |   52 +
 .../event/TaskAttemptStatusUpdateEvent.java     |   36 +
 .../tajo/master/event/TaskCompletionEvent.java  |   35 +
 .../org/apache/tajo/master/event/TaskEvent.java |   35 +
 .../apache/tajo/master/event/TaskEventType.java |   38 +
 .../tajo/master/event/TaskFatalErrorEvent.java  |   35 +
 .../tajo/master/event/TaskRequestEvent.java     |   50 +
 .../tajo/master/event/TaskScheduleEvent.java    |   67 +
 .../tajo/master/event/TaskSchedulerEvent.java   |   41 +
 .../tajo/master/event/TaskTAttemptEvent.java    |   34 +
 .../tajo/master/rm/RMContainerAllocator.java    |  217 ++
 .../org/apache/tajo/net/CachedDNSResolver.java  |   64 +
 .../tajo/scheduler/event/ScheduleTaskEvent.java |   34 +
 .../tajo/scheduler/event/SchedulerEvent.java    |   28 +
 .../scheduler/event/SchedulerEventType.java     |   27 +
 .../main/java/org/apache/tajo/util/GeoUtil.java |   46 +
 .../java/org/apache/tajo/util/IndexUtil.java    |  151 ++
 .../java/org/apache/tajo/webapp/HttpServer.java |  445 ++++
 .../apache/tajo/webapp/StaticHttpServer.java    |   68 +
 .../java/org/apache/tajo/worker/Fetcher.java    |  206 ++
 .../apache/tajo/worker/InterDataRetriever.java  |  113 +
 .../tajo/worker/PartitionRetrieverHandler.java  |   44 +
 .../tajo/worker/RangeRetrieverHandler.java      |  161 ++
 .../org/apache/tajo/worker/TajoQueryEngine.java |   51 +
 .../main/java/org/apache/tajo/worker/Task.java  |  640 +++++
 .../java/org/apache/tajo/worker/TaskRunner.java |  394 ++++
 .../FileAccessForbiddenException.java           |   40 +
 .../tajo/worker/dataserver/HttpDataServer.java  |   87 +
 .../dataserver/HttpDataServerHandler.java       |  199 ++
 .../HttpDataServerPipelineFactory.java          |   55 +
 .../apache/tajo/worker/dataserver/HttpUtil.java |   69 +
 .../retriever/AdvancedDataRetriever.java        |  128 +
 .../dataserver/retriever/DataRetriever.java     |   29 +
 .../retriever/DirectoryRetriever.java           |   56 +
 .../worker/dataserver/retriever/FileChunk.java  |   51 +
 .../dataserver/retriever/RetrieverHandler.java  |   33 +
 .../src/main/java/tajo/QueryConf.java           |   64 -
 .../src/main/java/tajo/TaskAttemptContext.java  |  212 --
 .../main/java/tajo/benchmark/BenchmarkSet.java  |  111 -
 .../src/main/java/tajo/benchmark/Driver.java    |   46 -
 .../main/java/tajo/benchmark/SimpleQuery.java   |   29 -
 .../src/main/java/tajo/benchmark/TPCH.java      |  171 --
 .../src/main/java/tajo/cli/TajoCli.java         |  382 ---
 .../src/main/java/tajo/client/QueryStatus.java  |   79 -
 .../main/java/tajo/client/ResultSetUtil.java    |   49 -
 .../src/main/java/tajo/client/TajoClient.java   |  297 ---
 .../java/tajo/engine/eval/AggFuncCallEval.java  |  111 -
 .../tajo/engine/eval/AlgebraicException.java    |   41 -
 .../java/tajo/engine/eval/AlgebraicUtil.java    |  289 ---
 .../main/java/tajo/engine/eval/BinaryEval.java  |  234 --
 .../java/tajo/engine/eval/CaseWhenEval.java     |  238 --
 .../main/java/tajo/engine/eval/ConstEval.java   |  125 -
 .../main/java/tajo/engine/eval/EvalContext.java |   22 -
 .../main/java/tajo/engine/eval/EvalNode.java    |  155 --
 .../java/tajo/engine/eval/EvalNodeVisitor.java  |   23 -
 .../java/tajo/engine/eval/EvalTreeFactory.java  |   32 -
 .../java/tajo/engine/eval/EvalTreeUtil.java     |  353 ---
 .../main/java/tajo/engine/eval/FieldEval.java   |  147 --
 .../java/tajo/engine/eval/FuncCallEval.java     |   98 -
 .../main/java/tajo/engine/eval/FuncEval.java    |  142 --
 .../tajo/engine/eval/InvalidCastException.java  |   36 -
 .../tajo/engine/eval/InvalidEvalException.java  |   36 -
 .../main/java/tajo/engine/eval/IsNullEval.java  |  113 -
 .../main/java/tajo/engine/eval/LikeEval.java    |   96 -
 .../src/main/java/tajo/engine/eval/NotEval.java |  117 -
 .../tajo/engine/eval/PartialBinaryExpr.java     |   82 -
 .../engine/exception/EmptyClusterException.java |   34 -
 .../exception/IllegalQueryStatusException.java  |   38 -
 .../engine/exception/NTAQueryException.java     |   42 -
 .../exception/NoSuchQueryIdException.java       |   43 -
 .../exception/UnfinishedTaskException.java      |   35 -
 .../exception/UnknownWorkerException.java       |   44 -
 .../main/java/tajo/engine/function/Country.java |   40 -
 .../java/tajo/engine/function/InCountry.java    |   44 -
 .../tajo/engine/function/builtin/AvgDouble.java |   86 -
 .../tajo/engine/function/builtin/AvgFloat.java  |   85 -
 .../tajo/engine/function/builtin/AvgInt.java    |   85 -
 .../tajo/engine/function/builtin/AvgLong.java   |   85 -
 .../tajo/engine/function/builtin/CountRows.java |   75 -
 .../engine/function/builtin/CountValue.java     |   40 -
 .../java/tajo/engine/function/builtin/Date.java |   53 -
 .../tajo/engine/function/builtin/MaxDouble.java |   69 -
 .../tajo/engine/function/builtin/MaxFloat.java  |   67 -
 .../tajo/engine/function/builtin/MaxInt.java    |   68 -
 .../tajo/engine/function/builtin/MaxLong.java   |   68 -
 .../tajo/engine/function/builtin/MinDouble.java |   68 -
 .../tajo/engine/function/builtin/MinFloat.java  |   69 -
 .../tajo/engine/function/builtin/MinInt.java    |   68 -
 .../tajo/engine/function/builtin/MinLong.java   |   69 -
 .../tajo/engine/function/builtin/MinString.java |   73 -
 .../tajo/engine/function/builtin/RandomInt.java |   45 -
 .../tajo/engine/function/builtin/SumDouble.java |   68 -
 .../tajo/engine/function/builtin/SumFloat.java  |   66 -
 .../tajo/engine/function/builtin/SumInt.java    |   68 -
 .../tajo/engine/function/builtin/SumLong.java   |   68 -
 .../tajo/engine/function/builtin/Today.java     |   38 -
 .../java/tajo/engine/json/EvalNodeAdapter.java  |   55 -
 .../tajo/engine/json/FragmentDeserializer.java  |   54 -
 .../tajo/engine/json/FromTableDeserializer.java |   50 -
 .../main/java/tajo/engine/json/GsonCreator.java |   81 -
 .../tajo/engine/json/LogicalNodeAdapter.java    |   58 -
 .../java/tajo/engine/parser/CommandType.java    |   41 -
 .../main/java/tajo/engine/parser/CopyStmt.java  |   72 -
 .../tajo/engine/parser/CreateIndexStmt.java     |  107 -
 .../tajo/engine/parser/CreateTableStmt.java     |  128 -
 .../main/java/tajo/engine/parser/ParseTree.java |   63 -
 .../main/java/tajo/engine/parser/ParseUtil.java |   76 -
 .../tajo/engine/parser/ParserException.java     |   54 -
 .../java/tajo/engine/parser/QueryAnalyzer.java  | 1336 -----------
 .../java/tajo/engine/parser/QueryBlock.java     |  586 -----
 .../main/java/tajo/engine/parser/SetStmt.java   |   60 -
 .../java/tajo/engine/parser/StatementType.java  |   53 -
 .../main/java/tajo/engine/parser/TableMap.java  |   68 -
 .../main/java/tajo/engine/planner/JoinType.java |   28 -
 .../tajo/engine/planner/LogicalOptimizer.java   |  742 ------
 .../tajo/engine/planner/LogicalPlanner.java     |  687 ------
 .../tajo/engine/planner/PhysicalPlanner.java    |   36 -
 .../engine/planner/PhysicalPlannerImpl.java     |  321 ---
 .../java/tajo/engine/planner/PlannerUtil.java   |  616 -----
 .../tajo/engine/planner/PlanningContext.java    |   40 -
 .../engine/planner/PlanningContextImpl.java     |   94 -
 .../java/tajo/engine/planner/Projector.java     |  114 -
 .../engine/planner/RangeOverflowException.java  |   28 -
 .../engine/planner/RangePartitionAlgorithm.java |  127 -
 .../engine/planner/UniformRangePartition.java   |  331 ---
 .../engine/planner/global/GlobalOptimizer.java  |   80 -
 .../tajo/engine/planner/global/MasterPlan.java  |   49 -
 .../tajo/engine/planner/logical/BinaryNode.java |   86 -
 .../engine/planner/logical/CreateTableNode.java |  148 --
 .../engine/planner/logical/EvalExprNode.java    |   75 -
 .../tajo/engine/planner/logical/ExceptNode.java |   46 -
 .../tajo/engine/planner/logical/ExprType.java   |   51 -
 .../engine/planner/logical/GroupbyNode.java     |  152 --
 .../engine/planner/logical/IndexScanNode.java   |  131 --
 .../engine/planner/logical/IndexWriteNode.java  |   95 -
 .../engine/planner/logical/IntersectNode.java   |   46 -
 .../tajo/engine/planner/logical/JoinNode.java   |  110 -
 .../tajo/engine/planner/logical/LimitNode.java  |   74 -
 .../engine/planner/logical/LogicalNode.java     |  110 -
 .../planner/logical/LogicalNodeVisitor.java     |   27 -
 .../engine/planner/logical/LogicalRootNode.java |   54 -
 .../engine/planner/logical/ProjectionNode.java  |  106 -
 .../tajo/engine/planner/logical/ScanNode.java   |  193 --
 .../engine/planner/logical/SelectionNode.java   |   80 -
 .../tajo/engine/planner/logical/SortNode.java   |   97 -
 .../engine/planner/logical/StoreIndexNode.java  |   27 -
 .../engine/planner/logical/StoreTableNode.java  |  166 --
 .../tajo/engine/planner/logical/UnaryNode.java  |   73 -
 .../tajo/engine/planner/logical/UnionNode.java  |   46 -
 .../planner/logical/extended/PipeType.java      |   24 -
 .../planner/logical/extended/ReceiveNode.java   |  128 -
 .../logical/extended/RepartitionType.java       |   25 -
 .../planner/logical/extended/SendNode.java      |  152 --
 .../tajo/engine/planner/logical/join/Edge.java  |   50 -
 .../engine/planner/logical/join/JoinTree.java   |   95 -
 .../planner/physical/AggregationExec.java       |   96 -
 .../engine/planner/physical/BNLJoinExec.java    |  197 --
 .../planner/physical/BSTIndexScanExec.java      |  142 --
 .../planner/physical/BinaryPhysicalExec.java    |   63 -
 .../engine/planner/physical/EvalExprExec.java   |   69 -
 .../planner/physical/ExternalSortExec.java      |  221 --
 .../planner/physical/HashAggregateExec.java     |  108 -
 .../engine/planner/physical/HashJoinExec.java   |  196 --
 .../planner/physical/HashPartitioner.java       |   44 -
 .../engine/planner/physical/IndexWriteExec.java |   88 -
 .../planner/physical/IndexedStoreExec.java      |  118 -
 .../planner/physical/JoinTupleComparator.java   |   87 -
 .../tajo/engine/planner/physical/LimitExec.java |   55 -
 .../engine/planner/physical/MemSortExec.java    |   81 -
 .../engine/planner/physical/MergeJoinExec.java  |  181 --
 .../engine/planner/physical/NLJoinExec.java     |  108 -
 .../planner/physical/PartitionedStoreExec.java  |  153 --
 .../engine/planner/physical/Partitioner.java    |   43 -
 .../engine/planner/physical/PhysicalExec.java   |   51 -
 .../engine/planner/physical/ProjectionExec.java |   66 -
 .../engine/planner/physical/SelectionExec.java  |   70 -
 .../engine/planner/physical/SeqScanExec.java    |  113 -
 .../planner/physical/SortAggregateExec.java     |   99 -
 .../tajo/engine/planner/physical/SortExec.java  |   51 -
 .../engine/planner/physical/StoreTableExec.java |  108 -
 .../engine/planner/physical/TunnelExec.java     |   42 -
 .../planner/physical/UnaryPhysicalExec.java     |   57 -
 .../tajo/engine/planner/physical/UnionExec.java |   62 -
 .../tajo/engine/query/QueryUnitRequestImpl.java |  304 ---
 .../java/tajo/engine/query/ResultSetImpl.java   | 2222 ------------------
 .../engine/query/ResultSetMetaDataImpl.java     |  259 --
 .../exception/AmbiguousFieldException.java      |   30 -
 .../query/exception/InvalidQueryException.java  |   35 -
 .../exception/NotSupportQueryException.java     |   34 -
 .../engine/query/exception/TQLParseError.java   |   27 -
 .../engine/query/exception/TQLSyntaxError.java  |   45 -
 .../exception/UndefinedFunctionException.java   |   34 -
 .../main/java/tajo/engine/utils/ProtoUtil.java  |   29 -
 .../main/java/tajo/engine/utils/SchemaUtil.java |   97 -
 .../main/java/tajo/engine/utils/ThreadUtil.java |  149 --
 .../main/java/tajo/engine/utils/TupleUtil.java  |  388 ---
 .../ipc/protocolrecords/QueryUnitRequest.java   |   46 -
 .../main/java/tajo/master/ClientService.java    |  433 ----
 .../main/java/tajo/master/ExecutionBlock.java   |  181 --
 .../java/tajo/master/ExecutionBlockCursor.java  |   80 -
 .../src/main/java/tajo/master/GlobalEngine.java |  333 ---
 .../main/java/tajo/master/GlobalPlanner.java    |  721 ------
 .../java/tajo/master/GlobalPlannerUtils.java    |  197 --
 .../src/main/java/tajo/master/Query.java        |  432 ----
 .../src/main/java/tajo/master/QueryMaster.java  |  465 ----
 .../src/main/java/tajo/master/QueryUnit.java    |  502 ----
 .../main/java/tajo/master/QueryUnitAttempt.java |  344 ---
 .../main/java/tajo/master/Repartitioner.java    |  582 -----
 .../src/main/java/tajo/master/SubQuery.java     |  766 ------
 .../main/java/tajo/master/SubQueryState.java    |   28 -
 .../src/main/java/tajo/master/TajoMaster.java   |  391 ---
 .../java/tajo/master/TaskRunnerGroupEvent.java  |   47 -
 .../java/tajo/master/TaskRunnerLauncher.java    |   25 -
 .../tajo/master/TaskRunnerLauncherImpl.java     |  540 -----
 .../java/tajo/master/TaskRunnerListener.java    |  172 --
 .../main/java/tajo/master/TaskScheduler.java    |   26 -
 .../java/tajo/master/TaskSchedulerImpl.java     |  420 ----
 .../src/main/java/tajo/master/TaskState.java    |   23 -
 .../java/tajo/master/cluster/ServerName.java    |  123 -
 .../tajo/master/cluster/WorkerListener.java     |  148 --
 .../master/event/ContainerAllocationEvent.java  |   73 -
 .../event/ContainerAllocatorEventType.java      |   26 -
 .../java/tajo/master/event/ContainerEvent.java  |   37 -
 .../event/GrouppedContainerAllocatorEvent.java  |   45 -
 .../event/QueryDiagnosticsUpdateEvent.java      |   34 -
 .../main/java/tajo/master/event/QueryEvent.java |   36 -
 .../java/tajo/master/event/QueryEventType.java  |   29 -
 .../tajo/master/event/QueryFinishEvent.java     |   39 -
 .../tajo/master/event/QuerySubQueryEvent.java   |   35 -
 .../master/event/SubQueryCompletedEvent.java    |   42 -
 .../event/SubQueryContainerAllocationEvent.java |   38 -
 .../java/tajo/master/event/SubQueryEvent.java   |   35 -
 .../tajo/master/event/SubQueryEventType.java    |   39 -
 .../tajo/master/event/SubQuerySucceeEvent.java  |   36 -
 .../tajo/master/event/SubQueryTaskEvent.java    |   37 -
 .../master/event/TaskAttemptAssignedEvent.java  |   48 -
 .../tajo/master/event/TaskAttemptEvent.java     |   36 -
 .../tajo/master/event/TaskAttemptEventType.java |   52 -
 .../event/TaskAttemptStatusUpdateEvent.java     |   36 -
 .../tajo/master/event/TaskCompletionEvent.java  |   35 -
 .../main/java/tajo/master/event/TaskEvent.java  |   35 -
 .../java/tajo/master/event/TaskEventType.java   |   38 -
 .../tajo/master/event/TaskFatalErrorEvent.java  |   35 -
 .../tajo/master/event/TaskRequestEvent.java     |   50 -
 .../tajo/master/event/TaskScheduleEvent.java    |   67 -
 .../tajo/master/event/TaskSchedulerEvent.java   |   41 -
 .../tajo/master/event/TaskTAttemptEvent.java    |   34 -
 .../tajo/master/rm/RMContainerAllocator.java    |  217 --
 .../main/java/tajo/net/CachedDNSResolver.java   |   64 -
 .../tajo/scheduler/event/ScheduleTaskEvent.java |   34 -
 .../tajo/scheduler/event/SchedulerEvent.java    |   28 -
 .../scheduler/event/SchedulerEventType.java     |   27 -
 .../src/main/java/tajo/util/GeoUtil.java        |   46 -
 .../src/main/java/tajo/util/IndexUtil.java      |  151 --
 .../src/main/java/tajo/webapp/HttpServer.java   |  445 ----
 .../main/java/tajo/webapp/StaticHttpServer.java |   68 -
 .../src/main/java/tajo/worker/Fetcher.java      |  206 --
 .../java/tajo/worker/InterDataRetriever.java    |  113 -
 .../tajo/worker/PartitionRetrieverHandler.java  |   44 -
 .../java/tajo/worker/RangeRetrieverHandler.java |  161 --
 .../main/java/tajo/worker/TajoQueryEngine.java  |   51 -
 .../src/main/java/tajo/worker/Task.java         |  640 -----
 .../src/main/java/tajo/worker/TaskRunner.java   |  394 ----
 .../FileAccessForbiddenException.java           |   40 -
 .../tajo/worker/dataserver/HttpDataServer.java  |   87 -
 .../dataserver/HttpDataServerHandler.java       |  199 --
 .../HttpDataServerPipelineFactory.java          |   55 -
 .../java/tajo/worker/dataserver/HttpUtil.java   |   69 -
 .../retriever/AdvancedDataRetriever.java        |  128 -
 .../dataserver/retriever/DataRetriever.java     |   29 -
 .../retriever/DirectoryRetriever.java           |   56 -
 .../worker/dataserver/retriever/FileChunk.java  |   51 -
 .../dataserver/retriever/RetrieverHandler.java  |   33 -
 .../src/main/proto/CatalogProtocol.proto        |    2 +-
 .../src/main/proto/CatalogProtos.proto          |    2 +-
 .../src/main/proto/ClientProtocol.proto         |    2 +-
 .../src/main/proto/DataTypes.proto              |    2 +-
 .../src/main/proto/MasterWorkerProtocol.proto   |    2 +-
 .../src/main/proto/MasterWorkerProtos.proto     |    2 +-
 .../src/main/proto/PrimitiveProtos.proto        |    2 +-
 .../src/main/proto/TajoIdProtos.proto           |    2 +-
 .../src/main/proto/tajo_protos.proto            |    2 +-
 .../org/apache/tajo/BackendTestingUtil.java     |  141 ++
 .../java/org/apache/tajo/IntegrationTest.java   |   22 +
 .../apache/tajo/LocalTajoTestingUtility.java    |   77 +
 .../org/apache/tajo/MiniTajoYarnCluster.java    |  165 ++
 .../org/apache/tajo/TajoTestingCluster.java     |  570 +++++
 .../org/apache/tajo/TestQueryIdFactory.java     |   56 +
 .../java/org/apache/tajo/TestQueryUnitId.java   |  167 ++
 .../test/java/org/apache/tajo/TpchTestBase.java |  122 +
 .../org/apache/tajo/benchmark/TestTPCH.java     |   94 +
 .../org/apache/tajo/client/TestTajoClient.java  |  164 ++
 .../org/apache/tajo/cluster/TestServerName.java |  102 +
 .../apache/tajo/engine/eval/TestEvalTree.java   |  691 ++++++
 .../tajo/engine/eval/TestEvalTreeUtil.java      |  308 +++
 .../tajo/engine/function/TestAggFunction.java   |   65 +
 .../engine/function/TestBuiltinFunctions.java   |  107 +
 .../engine/function/TestGeneralFunction.java    |   49 +
 .../tajo/engine/parser/TestQueryAnalyzer.java   |  653 +++++
 .../tajo/engine/parser/TestSQLParser.java       |  993 ++++++++
 .../plan/global/TestGlobalQueryPlanner.java     |  385 +++
 .../tajo/engine/planner/TestLogicalNode.java    |   31 +
 .../engine/planner/TestLogicalOptimizer.java    |  239 ++
 .../tajo/engine/planner/TestLogicalPlanner.java |  840 +++++++
 .../tajo/engine/planner/TestPlannerUtil.java    |  341 +++
 .../planner/TestUniformRangePartition.java      |  289 +++
 .../global/TestGlobalQueryOptimizer.java        |  171 ++
 .../logical/extended/TestReceiveNode.java       |   62 +
 .../planner/logical/extended/TestSendNode.java  |   50 +
 .../planner/physical/TestBNLJoinExec.java       |  225 ++
 .../planner/physical/TestBSTIndexExec.java      |  200 ++
 .../planner/physical/TestExternalSortExec.java  |  170 ++
 .../planner/physical/TestHashJoinExec.java      |  179 ++
 .../planner/physical/TestHashPartitioner.java   |   84 +
 .../planner/physical/TestMergeJoinExec.java     |  228 ++
 .../engine/planner/physical/TestNLJoinExec.java |  195 ++
 .../planner/physical/TestPhysicalPlanner.java   |  840 +++++++
 .../engine/planner/physical/TestSortExec.java   |  161 ++
 .../tajo/engine/query/TestGroupByQuery.java     |   86 +
 .../apache/tajo/engine/query/TestJoinQuery.java |  152 ++
 .../tajo/engine/query/TestNullValues.java       |  115 +
 .../tajo/engine/query/TestResultSetImpl.java    |  126 +
 .../tajo/engine/query/TestSelectQuery.java      |  305 +++
 .../apache/tajo/engine/query/TestSortQuery.java |  139 ++
 .../apache/tajo/engine/util/TestTupleUtil.java  |  231 ++
 .../tajo/master/TestExecutionBlockCursor.java   |   98 +
 .../apache/tajo/master/TestRepartitioner.java   |   76 +
 .../org/apache/tajo/storage/TestFragment.java   |  142 ++
 .../org/apache/tajo/storage/TestRowFile.java    |  161 ++
 .../org/apache/tajo/webapp/TestHttpServer.java  |  132 ++
 .../org/apache/tajo/worker/TaskRunnerTest.java  |   68 +
 .../org/apache/tajo/worker/TestFetcher.java     |   82 +
 .../tajo/worker/TestRangeRetrieverHandler.java  |  342 +++
 .../worker/dataserver/TestHttpDataServer.java   |  174 ++
 .../tajo/worker/dataserver/TestHttpUtil.java    |   49 +
 .../src/test/java/tajo/BackendTestingUtil.java  |  141 --
 .../src/test/java/tajo/IntegrationTest.java     |   22 -
 .../test/java/tajo/LocalTajoTestingUtility.java |   77 -
 .../src/test/java/tajo/MiniTajoYarnCluster.java |  165 --
 .../src/test/java/tajo/TajoTestingCluster.java  |  570 -----
 .../src/test/java/tajo/TestQueryIdFactory.java  |   56 -
 .../src/test/java/tajo/TestQueryUnitId.java     |  167 --
 .../src/test/java/tajo/TpchTestBase.java        |  122 -
 .../src/test/java/tajo/benchmark/TestTPCH.java  |   94 -
 .../test/java/tajo/client/TestTajoClient.java   |  164 --
 .../test/java/tajo/cluster/TestServerName.java  |  102 -
 .../java/tajo/engine/eval/TestEvalTree.java     |  691 ------
 .../java/tajo/engine/eval/TestEvalTreeUtil.java |  308 ---
 .../tajo/engine/function/TestAggFunction.java   |   65 -
 .../engine/function/TestBuiltinFunctions.java   |  107 -
 .../engine/function/TestGeneralFunction.java    |   49 -
 .../tajo/engine/parser/TestQueryAnalyzer.java   |  653 -----
 .../java/tajo/engine/parser/TestSQLParser.java  |  993 --------
 .../plan/global/TestGlobalQueryPlanner.java     |  385 ---
 .../tajo/engine/planner/TestLogicalNode.java    |   31 -
 .../engine/planner/TestLogicalOptimizer.java    |  239 --
 .../tajo/engine/planner/TestLogicalPlanner.java |  840 -------
 .../tajo/engine/planner/TestPlannerUtil.java    |  341 ---
 .../planner/TestUniformRangePartition.java      |  289 ---
 .../global/TestGlobalQueryOptimizer.java        |  171 --
 .../logical/extended/TestReceiveNode.java       |   62 -
 .../planner/logical/extended/TestSendNode.java  |   50 -
 .../planner/physical/TestBNLJoinExec.java       |  225 --
 .../planner/physical/TestBSTIndexExec.java      |  200 --
 .../planner/physical/TestExternalSortExec.java  |  170 --
 .../planner/physical/TestHashJoinExec.java      |  179 --
 .../planner/physical/TestHashPartitioner.java   |   84 -
 .../planner/physical/TestMergeJoinExec.java     |  228 --
 .../engine/planner/physical/TestNLJoinExec.java |  195 --
 .../planner/physical/TestPhysicalPlanner.java   |  840 -------
 .../engine/planner/physical/TestSortExec.java   |  161 --
 .../tajo/engine/query/TestGroupByQuery.java     |   86 -
 .../java/tajo/engine/query/TestJoinQuery.java   |  152 --
 .../java/tajo/engine/query/TestNullValues.java  |  115 -
 .../tajo/engine/query/TestResultSetImpl.java    |  126 -
 .../java/tajo/engine/query/TestSelectQuery.java |  305 ---
 .../java/tajo/engine/query/TestSortQuery.java   |  139 --
 .../java/tajo/engine/util/TestTupleUtil.java    |  231 --
 .../tajo/master/TestExecutionBlockCursor.java   |   98 -
 .../java/tajo/master/TestRepartitioner.java     |   76 -
 .../test/java/tajo/storage/TestFragment.java    |  142 --
 .../src/test/java/tajo/storage/TestRowFile.java |  161 --
 .../test/java/tajo/webapp/TestHttpServer.java   |  132 --
 .../test/java/tajo/worker/TaskRunnerTest.java   |   68 -
 .../src/test/java/tajo/worker/TestFetcher.java  |   82 -
 .../tajo/worker/TestRangeRetrieverHandler.java  |  342 ---
 .../worker/dataserver/TestHttpDataServer.java   |  174 --
 .../tajo/worker/dataserver/TestHttpUtil.java    |   49 -
 .../src/test/resources/catalog-default.xml      |    2 +-
 .../webapps/TestHttpServer/WEB-INF/web.xml      |    2 +-
 .../tajo/pullserver/FadvisedChunkedFile.java    |   80 +
 .../tajo/pullserver/FadvisedFileRegion.java     |   82 +
 .../FileAccessForbiddenException.java           |   40 +
 .../tajo/pullserver/HttpDataServerHandler.java  |  244 ++
 .../HttpDataServerPipelineFactory.java          |   56 +
 .../org/apache/tajo/pullserver/HttpUtil.java    |   69 +
 .../tajo/pullserver/PullServerAuxService.java   |  647 +++++
 .../retriever/AdvancedDataRetriever.java        |  125 +
 .../pullserver/retriever/DataRetriever.java     |   29 +
 .../retriever/DirectoryRetriever.java           |   56 +
 .../tajo/pullserver/retriever/FileChunk.java    |   51 +
 .../pullserver/retriever/RetrieverHandler.java  |   33 +
 .../tajo/pullserver/FadvisedChunkedFile.java    |   80 -
 .../tajo/pullserver/FadvisedFileRegion.java     |   82 -
 .../FileAccessForbiddenException.java           |   40 -
 .../tajo/pullserver/HttpDataServerHandler.java  |  244 --
 .../HttpDataServerPipelineFactory.java          |   56 -
 .../src/main/java/tajo/pullserver/HttpUtil.java |   69 -
 .../tajo/pullserver/PullServerAuxService.java   |  648 -----
 .../retriever/AdvancedDataRetriever.java        |  125 -
 .../pullserver/retriever/DataRetriever.java     |   29 -
 .../retriever/DirectoryRetriever.java           |   56 -
 .../tajo/pullserver/retriever/FileChunk.java    |   51 -
 .../pullserver/retriever/RetrieverHandler.java  |   33 -
 .../java/org/apache/tajo/storage/Appender.java  |   39 +
 .../java/org/apache/tajo/storage/CSVFile.java   |  476 ++++
 .../org/apache/tajo/storage/FileAppender.java   |   61 +
 .../org/apache/tajo/storage/FileScanner.java    |   66 +
 .../java/org/apache/tajo/storage/Fragment.java  |  350 +++
 .../org/apache/tajo/storage/FrameTuple.java     |  219 ++
 .../org/apache/tajo/storage/MergeScanner.java   |  110 +
 .../tajo/storage/NumericPathComparator.java     |   34 +
 .../java/org/apache/tajo/storage/RawFile.java   |  466 ++++
 .../java/org/apache/tajo/storage/RowFile.java   |  537 +++++
 .../org/apache/tajo/storage/RowStoreUtil.java   |  192 ++
 .../java/org/apache/tajo/storage/Scanner.java   |   87 +
 .../apache/tajo/storage/SeekableScanner.java    |   28 +
 .../java/org/apache/tajo/storage/Storage.java   |   44 +
 .../org/apache/tajo/storage/StorageManager.java |  601 +++++
 .../org/apache/tajo/storage/StorageUtil.java    |   84 +
 .../apache/tajo/storage/TableStatistics.java    |  124 +
 .../java/org/apache/tajo/storage/Tuple.java     |   78 +
 .../apache/tajo/storage/TupleComparator.java    |  156 ++
 .../org/apache/tajo/storage/TupleRange.java     |  103 +
 .../java/org/apache/tajo/storage/VTuple.java    |  213 ++
 .../AlreadyExistsStorageException.java          |   39 +
 .../exception/UnknownCodecException.java        |   32 +
 .../exception/UnknownDataTypeException.java     |   32 +
 .../exception/UnsupportedFileTypeException.java |   36 +
 .../apache/tajo/storage/index/IndexMethod.java  |   32 +
 .../apache/tajo/storage/index/IndexProtos.java  |  665 ++++++
 .../apache/tajo/storage/index/IndexReader.java  |   35 +
 .../apache/tajo/storage/index/IndexWriter.java  |   33 +
 .../tajo/storage/index/OrderIndexReader.java    |   45 +
 .../apache/tajo/storage/index/bst/BSTIndex.java |  623 +++++
 .../tajo/storage/json/FragmentDeserializer.java |   54 +
 .../apache/tajo/storage/json/GsonCreator.java   |   77 +
 .../storage/rcfile/BytesRefArrayWritable.java   |  256 ++
 .../tajo/storage/rcfile/BytesRefWritable.java   |  248 ++
 .../apache/tajo/storage/rcfile/CodecPool.java   |  165 ++
 .../storage/rcfile/ColumnProjectionUtils.java   |  117 +
 .../rcfile/LazyDecompressionCallback.java       |   32 +
 .../rcfile/NonSyncByteArrayInputStream.java     |  109 +
 .../rcfile/NonSyncByteArrayOutputStream.java    |  108 +
 .../storage/rcfile/NonSyncDataInputBuffer.java  |  490 ++++
 .../storage/rcfile/NonSyncDataOutputBuffer.java |   87 +
 .../org/apache/tajo/storage/rcfile/RCFile.java  | 1778 ++++++++++++++
 .../tajo/storage/rcfile/RCFileWrapper.java      |  337 +++
 .../SchemaAwareCompressionInputStream.java      |   43 +
 .../SchemaAwareCompressionOutputStream.java     |   44 +
 .../tajo/storage/trevni/TrevniAppender.java     |  199 ++
 .../tajo/storage/trevni/TrevniScanner.java      |  174 ++
 .../src/main/java/tajo/storage/Appender.java    |   39 -
 .../src/main/java/tajo/storage/CSVFile.java     |  476 ----
 .../main/java/tajo/storage/FileAppender.java    |   61 -
 .../src/main/java/tajo/storage/FileScanner.java |   66 -
 .../src/main/java/tajo/storage/Fragment.java    |  350 ---
 .../src/main/java/tajo/storage/FrameTuple.java  |  219 --
 .../main/java/tajo/storage/MergeScanner.java    |  110 -
 .../tajo/storage/NumericPathComparator.java     |   34 -
 .../src/main/java/tajo/storage/RawFile.java     |  466 ----
 .../src/main/java/tajo/storage/RowFile.java     |  537 -----
 .../main/java/tajo/storage/RowStoreUtil.java    |  192 --
 .../src/main/java/tajo/storage/Scanner.java     |   87 -
 .../main/java/tajo/storage/SeekableScanner.java |   28 -
 .../src/main/java/tajo/storage/Storage.java     |   44 -
 .../main/java/tajo/storage/StorageManager.java  |  601 -----
 .../src/main/java/tajo/storage/StorageUtil.java |   84 -
 .../main/java/tajo/storage/TableStatistics.java |  124 -
 .../src/main/java/tajo/storage/Tuple.java       |   78 -
 .../main/java/tajo/storage/TupleComparator.java |  156 --
 .../src/main/java/tajo/storage/TupleRange.java  |  103 -
 .../src/main/java/tajo/storage/VTuple.java      |  213 --
 .../AlreadyExistsStorageException.java          |   39 -
 .../exception/UnknownCodecException.java        |   32 -
 .../exception/UnknownDataTypeException.java     |   32 -
 .../exception/UnsupportedFileTypeException.java |   36 -
 .../java/tajo/storage/index/IndexMethod.java    |   32 -
 .../java/tajo/storage/index/IndexProtos.java    |  665 ------
 .../java/tajo/storage/index/IndexReader.java    |   35 -
 .../java/tajo/storage/index/IndexWriter.java    |   33 -
 .../tajo/storage/index/OrderIndexReader.java    |   45 -
 .../java/tajo/storage/index/bst/BSTIndex.java   |  623 -----
 .../tajo/storage/json/FragmentDeserializer.java |   54 -
 .../java/tajo/storage/json/GsonCreator.java     |   77 -
 .../storage/rcfile/BytesRefArrayWritable.java   |  256 --
 .../tajo/storage/rcfile/BytesRefWritable.java   |  248 --
 .../java/tajo/storage/rcfile/CodecPool.java     |  165 --
 .../storage/rcfile/ColumnProjectionUtils.java   |  117 -
 .../rcfile/LazyDecompressionCallback.java       |   32 -
 .../rcfile/NonSyncByteArrayInputStream.java     |  109 -
 .../rcfile/NonSyncByteArrayOutputStream.java    |  108 -
 .../storage/rcfile/NonSyncDataInputBuffer.java  |  490 ----
 .../storage/rcfile/NonSyncDataOutputBuffer.java |   87 -
 .../main/java/tajo/storage/rcfile/RCFile.java   | 1778 --------------
 .../java/tajo/storage/rcfile/RCFileWrapper.java |  337 ---
 .../SchemaAwareCompressionInputStream.java      |   43 -
 .../SchemaAwareCompressionOutputStream.java     |   44 -
 .../tajo/storage/trevni/TrevniAppender.java     |  199 --
 .../java/tajo/storage/trevni/TrevniScanner.java |  174 --
 .../src/main/proto/CatalogProtos.proto          |    2 +-
 .../src/main/proto/DataTypes.proto              |    2 +-
 .../src/main/proto/IndexProtos.proto            |    2 +-
 .../src/main/proto/PrimitiveProtos.proto        |    2 +-
 .../src/main/resources/storage-default.xml      |   20 +-
 .../org/apache/tajo/storage/TestFrameTuple.java |   84 +
 .../apache/tajo/storage/TestMergeScanner.java   |  155 ++
 .../apache/tajo/storage/TestStorageManager.java |   93 +
 .../org/apache/tajo/storage/TestStorages.java   |  235 ++
 .../tajo/storage/TestTupleComparator.java       |   77 +
 .../org/apache/tajo/storage/TestVTuple.java     |  141 ++
 .../apache/tajo/storage/index/TestBSTIndex.java | 1249 ++++++++++
 .../index/TestSingleCSVFileBSTIndex.java        |  244 ++
 .../apache/tajo/storage/rcfile/TestRCFile.java  |  666 ++++++
 .../test/java/tajo/storage/TestFrameTuple.java  |   84 -
 .../java/tajo/storage/TestMergeScanner.java     |  155 --
 .../java/tajo/storage/TestStorageManager.java   |   93 -
 .../test/java/tajo/storage/TestStorages.java    |  235 --
 .../java/tajo/storage/TestTupleComparator.java  |   77 -
 .../src/test/java/tajo/storage/TestVTuple.java  |  141 --
 .../java/tajo/storage/index/TestBSTIndex.java   | 1249 ----------
 .../index/TestSingleCSVFileBSTIndex.java        |  244 --
 .../java/tajo/storage/rcfile/TestRCFile.java    |  666 ------
 .../src/test/resources/storage-default.xml      |   20 +-
 tajo-dist/src/main/bin/tajo                     |   12 +-
 .../main/antlr3/tajo/frontend/sql/SQLLexer.g    |    4 +-
 .../main/antlr3/tajo/frontend/sql/SQLParser.g   |    4 +-
 .../apache/tajo/frontend/sql/QueryBlock.java    |  133 ++
 .../apache/tajo/frontend/sql/SQLAnalyzer.java   |  932 ++++++++
 .../apache/tajo/frontend/sql/SQLParseError.java |   27 +
 .../tajo/frontend/sql/SQLSyntaxError.java       |   45 +
 .../main/java/tajo/frontend/sql/QueryBlock.java |  133 --
 .../java/tajo/frontend/sql/SQLAnalyzer.java     |  932 --------
 .../java/tajo/frontend/sql/SQLParseError.java   |   27 -
 .../java/tajo/frontend/sql/SQLSyntaxError.java  |   45 -
 .../tajo/frontend/sql/TestSQLAnalyzer.java      |  572 +++++
 .../apache/tajo/frontend/sql/TestSQLParser.java |  914 +++++++
 .../java/tajo/frontend/sql/TestSQLAnalyzer.java |  572 -----
 .../java/tajo/frontend/sql/TestSQLParser.java   |  914 -------
 tajo-project/src/site/apt/configuration.apt     |   26 +-
 tajo-project/src/site/apt/getting_started.apt   |   10 +-
 .../java/org/apache/tajo/rpc/CallFuture.java    |   75 +
 .../java/org/apache/tajo/rpc/CallFuture2.java   |   74 +
 .../main/java/org/apache/tajo/rpc/Callback.java |  112 +
 .../org/apache/tajo/rpc/NettyAsyncRpcProxy.java |  177 ++
 .../apache/tajo/rpc/NettyBlockingRpcProxy.java  |  157 ++
 .../org/apache/tajo/rpc/NettyClientBase.java    |   90 +
 .../main/java/org/apache/tajo/rpc/NettyRpc.java |   42 +
 .../org/apache/tajo/rpc/NettyRpcController.java |   63 +
 .../org/apache/tajo/rpc/NettyRpcServer.java     |  161 ++
 .../org/apache/tajo/rpc/NettyServerBase.java    |  168 ++
 .../java/org/apache/tajo/rpc/NullCallback.java  |   38 +
 .../apache/tajo/rpc/ProtoAsyncRpcClient.java    |  205 ++
 .../apache/tajo/rpc/ProtoAsyncRpcServer.java    |  125 +
 .../apache/tajo/rpc/ProtoBlockingRpcClient.java |  232 ++
 .../apache/tajo/rpc/ProtoBlockingRpcServer.java |  124 +
 .../apache/tajo/rpc/ProtoPipelineFactory.java   |   51 +
 .../apache/tajo/rpc/RemoteCallException.java    |   55 +
 .../org/apache/tajo/rpc/RemoteException.java    |   37 +
 .../tajo/rpc/benchmark/BenchmarkAsyncRPC.java   |   91 +
 .../rpc/benchmark/BenchmarkBlockingRPC.java     |   94 +
 .../tajo/rpc/benchmark/BenchmarkHadoopRPC.java  |  107 +
 .../java/org/apache/tajo/util/NetUtils.java     |   32 +
 tajo-rpc/src/main/java/tajo/rpc/CallFuture.java |   75 -
 .../src/main/java/tajo/rpc/CallFuture2.java     |   74 -
 tajo-rpc/src/main/java/tajo/rpc/Callback.java   |  112 -
 .../main/java/tajo/rpc/NettyAsyncRpcProxy.java  |  177 --
 .../java/tajo/rpc/NettyBlockingRpcProxy.java    |  157 --
 .../src/main/java/tajo/rpc/NettyClientBase.java |   90 -
 tajo-rpc/src/main/java/tajo/rpc/NettyRpc.java   |   42 -
 .../main/java/tajo/rpc/NettyRpcController.java  |   63 -
 .../src/main/java/tajo/rpc/NettyRpcServer.java  |  161 --
 .../src/main/java/tajo/rpc/NettyServerBase.java |  168 --
 .../src/main/java/tajo/rpc/NullCallback.java    |   38 -
 .../main/java/tajo/rpc/ProtoAsyncRpcClient.java |  205 --
 .../main/java/tajo/rpc/ProtoAsyncRpcServer.java |  125 -
 .../java/tajo/rpc/ProtoBlockingRpcClient.java   |  232 --
 .../java/tajo/rpc/ProtoBlockingRpcServer.java   |  124 -
 .../java/tajo/rpc/ProtoPipelineFactory.java     |   51 -
 .../main/java/tajo/rpc/RemoteCallException.java |   55 -
 .../src/main/java/tajo/rpc/RemoteException.java |   37 -
 .../tajo/rpc/benchmark/BenchmarkAsyncRPC.java   |   91 -
 .../rpc/benchmark/BenchmarkBlockingRPC.java     |   94 -
 .../tajo/rpc/benchmark/BenchmarkHadoopRPC.java  |  107 -
 tajo-rpc/src/main/java/tajo/util/NetUtils.java  |   32 -
 tajo-rpc/src/main/proto/DummyProtos.proto       |    2 +-
 tajo-rpc/src/main/proto/PrimitiveProtos.proto   |    2 +-
 .../src/main/proto/ProtoParamRpcProtocol.proto  |    2 +-
 .../src/main/proto/ProtoParamRpcProtos.proto    |    2 +-
 tajo-rpc/src/main/proto/RpcProtos.proto         |    2 +-
 tajo-rpc/src/main/proto/TestProtocol.proto      |    2 +-
 tajo-rpc/src/main/proto/TestProtos.proto        |    2 +-
 .../org/apache/tajo/rpc/TestNettyAsyncRpc.java  |  115 +
 .../apache/tajo/rpc/TestNettyBlockingRpc.java   |  110 +
 .../org/apache/tajo/rpc/TestProtoAsyncRpc.java  |  164 ++
 .../apache/tajo/rpc/TestProtoBlockingRpc.java   |   96 +
 .../rpc/test/impl/DummyProtocolAsyncImpl.java   |   82 +
 .../test/impl/DummyProtocolBlockingImpl.java    |   78 +
 .../test/java/tajo/rpc/TestNettyAsyncRpc.java   |  115 -
 .../java/tajo/rpc/TestNettyBlockingRpc.java     |  110 -
 .../test/java/tajo/rpc/TestProtoAsyncRpc.java   |  164 --
 .../java/tajo/rpc/TestProtoBlockingRpc.java     |   96 -
 .../rpc/test/impl/DummyProtocolAsyncImpl.java   |   82 -
 .../test/impl/DummyProtocolBlockingImpl.java    |   78 -
 1166 files changed, 83905 insertions(+), 83904 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index b965950..dc44657 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -10,6 +10,8 @@ Release 0.2.0 - unreleased
 
   IMPROVEMENTS
 
+    TAJO-22: The package prefix should be org.apache.tajo. (DaeMyung Kang via hyunsik)
+
     TAJO-75: Separate SQL.g into SQLParser.g and SQLLexer.g. (hyunsik)
 
     TAJO-74: Refactor parser rules of SQL.g. (hyunsik)

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
new file mode 100644
index 0000000..a70956b
--- /dev/null
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Aggregation.java
@@ -0,0 +1,116 @@
+/**
+ * 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.tajo.algebra;
+
+import org.apache.tajo.util.TUtil;
+
+public class Aggregation extends UnaryOperator {
+  private Target [] targets;
+  private GroupElement [] groups;
+  private Expr havingCondition;
+
+  public Aggregation() {
+    super(ExprType.Aggregation);
+  }
+
+  public Target [] getTargets() {
+    return this.targets;
+  }
+
+  public void setTargets(Target [] targets) {
+    this.targets = targets;
+  }
+
+  public boolean hasHavingCondition() {
+    return havingCondition != null;
+  }
+
+  public Expr getHavingCondition() {
+    return havingCondition;
+  }
+
+  public void setHavingCondition(Expr expr) {
+    this.havingCondition = expr;
+  }
+
+  public void setGroups(GroupElement [] groups) {
+    this.groups = groups;
+  }
+
+  public boolean isEmptyGrouping() {
+    return groups == null || groups.length == 0;
+  }
+
+  public GroupElement [] getGroupSet() {
+    return groups;
+  }
+
+  @Override
+  public boolean equalsTo(Expr expr) {
+    Aggregation another = (Aggregation) expr;
+    boolean a = TUtil.checkEquals(groups, another.groups);
+    boolean b = TUtil.checkEquals(targets, another.targets);
+    boolean c = TUtil.checkEquals(havingCondition, another.havingCondition);
+
+    return a && b && c;
+  }
+
+  public static class GroupElement implements JsonSerializable {
+    private GroupType group_type;
+    private ColumnReferenceExpr[] columns;
+
+    public GroupElement(GroupType groupType, ColumnReferenceExpr[] columns) {
+      this.group_type = groupType;
+      this.columns = columns;
+    }
+
+    public GroupType getType() {
+      return this.group_type;
+    }
+
+    public ColumnReferenceExpr[] getColumns() {
+      return this.columns;
+    }
+
+    public String toString() {
+      return toJson();
+    }
+
+    @Override
+    public String toJson() {
+      return JsonHelper.toJson(this);
+    }
+
+    public boolean equals(Object obj) {
+      if (obj instanceof GroupElement) {
+        GroupElement other = (GroupElement) obj;
+        return group_type.equals(other) &&
+            TUtil.checkEquals(columns, other.columns);
+      }
+
+      return false;
+    }
+  }
+
+  public static enum GroupType {
+    GROUPBY,
+    CUBE,
+    ROLLUP
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/tajo-algebra/src/main/java/org/apache/tajo/algebra/BinaryOperator.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/BinaryOperator.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/BinaryOperator.java
new file mode 100644
index 0000000..1883df2
--- /dev/null
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/BinaryOperator.java
@@ -0,0 +1,55 @@
+/**
+ * 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.tajo.algebra;
+
+public class BinaryOperator extends Expr {
+  Expr left;
+  Expr right;
+
+  BinaryOperator(ExprType opType) {
+    super(opType);
+  }
+
+  public BinaryOperator(ExprType type, Expr left, Expr right) {
+    super(type);
+    this.left = left;
+    this.right = right;
+  }
+
+  public Expr getLeft() {
+    return this.left;
+  }
+
+  public void setLeft(Expr left) {
+    this.left = left;
+  }
+
+  public Expr getRight() {
+    return this.right;
+  }
+
+  public void setRight(Expr right) {
+    this.right = right;
+  }
+
+  @Override
+  boolean equalsTo(Expr expr) {
+    return true;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenExpr.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenExpr.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenExpr.java
new file mode 100644
index 0000000..5e95b8a
--- /dev/null
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CaseWhenExpr.java
@@ -0,0 +1,88 @@
+/**
+ * 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.tajo.algebra;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+public class CaseWhenExpr extends Expr {
+  private List<WhenExpr> whens = new ArrayList<WhenExpr>();
+  private Expr else_result;
+
+  public CaseWhenExpr() {
+    super(ExprType.CaseWhen);
+  }
+
+  public void addWhen(Expr condition, Expr result) {
+    whens.add(new WhenExpr(condition, result));
+  }
+
+  public Collection<WhenExpr> getWhens() {
+    return this.whens;
+  }
+
+  public void setElseResult(Expr else_result) {
+    this.else_result = else_result;
+  }
+
+  public Object getElseResult() {
+    return this.else_result;
+  }
+
+  public boolean hasElseResult() {
+    return else_result != null;
+  }
+
+  @Override
+  boolean equalsTo(Expr expr) {
+    return false;
+  }
+
+  @Override
+  public String toJson() {
+    return JsonHelper.toJson(this);
+  }
+
+  public static class WhenExpr {
+    Expr condition;
+    Expr result;
+
+    public WhenExpr(Expr condition, Expr result) {
+      this.condition = condition;
+      this.result = result;
+    }
+
+    public Expr getCondition() {
+      return this.condition;
+    }
+
+    public Expr getResult() {
+      return this.result;
+    }
+
+    public boolean equals(Object obj) {
+      if (obj instanceof WhenExpr) {
+        WhenExpr another = (WhenExpr) obj;
+      }
+
+      return false;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/tajo-algebra/src/main/java/org/apache/tajo/algebra/ColumnReferenceExpr.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/ColumnReferenceExpr.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/ColumnReferenceExpr.java
new file mode 100644
index 0000000..888404d
--- /dev/null
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/ColumnReferenceExpr.java
@@ -0,0 +1,49 @@
+/**
+ * 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.tajo.algebra;
+
+import org.apache.tajo.util.TUtil;
+
+public class ColumnReferenceExpr extends Expr {
+  private String rel_name;
+  private String column_name;
+
+  public ColumnReferenceExpr(String columnName) {
+    super(ExprType.Column);
+    this.column_name = columnName;
+  }
+
+  public void setRelationName(String tableName) {
+    this.rel_name = tableName;
+  }
+
+  public String getName() {
+    return this.column_name;
+  }
+
+  public String getRelationName() {
+    return this.rel_name;
+  }
+
+  public boolean equalsTo(Expr expr) {
+    ColumnReferenceExpr another = (ColumnReferenceExpr) expr;
+    return column_name.equals(another.column_name) &&
+        TUtil.checkEquals(rel_name, another.rel_name);
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
new file mode 100644
index 0000000..92404ee
--- /dev/null
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/CreateTable.java
@@ -0,0 +1,140 @@
+/**
+ * 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.tajo.algebra;
+
+import org.apache.tajo.util.TUtil;
+
+import java.util.Map;
+
+public class CreateTable extends Expr {
+  private String rel_name;
+  private ColumnDefinition [] table_elements;
+  private String storage_type;
+  private String location;
+  private Expr subquery;
+  private Map<String, String> params;
+
+  public CreateTable(final String tableName) {
+    super(ExprType.CreateTable);
+    this.rel_name = tableName;
+  }
+
+  public CreateTable(final String relationName, final Expr subQuery) {
+    this(relationName);
+    this.subquery = subQuery;
+  }
+
+  public String getRelationName() {
+    return this.rel_name;
+  }
+
+  public boolean hasLocation() {
+    return location != null;
+  }
+
+  public String getLocation() {
+    return this.location;
+  }
+
+  public void setLocation(String location) {
+    this.location = location;
+  }
+
+  public boolean hasTableElements() {
+    return this.table_elements != null;
+  }
+
+  public ColumnDefinition [] getTableElements() {
+    return table_elements;
+  }
+
+  public void setTableElements(ColumnDefinition [] tableElements) {
+    this.table_elements = tableElements;
+  }
+
+  public boolean hasStorageType() {
+    return storage_type != null;
+  }
+
+  public void setStorageType(String storageType) {
+    this.storage_type = storageType;
+  }
+
+  public String getStorageType() {
+    return storage_type;
+  }
+
+  public boolean hasParams() {
+    return params != null;
+  }
+
+  public Map<String, String> getParams() {
+    return params;
+  }
+
+  public void setParams(Map<String, String> params) {
+    this.params = params;
+  }
+
+  public boolean hasSubQuery() {
+    return subquery != null;
+  }
+
+  public Expr getSubQuery() {
+    return subquery;
+  }
+
+  @Override
+  boolean equalsTo(Expr expr) {
+    CreateTable another = (CreateTable) expr;
+    return rel_name.equals(another.rel_name) &&
+        TUtil.checkEquals(table_elements, another.table_elements) &&
+        TUtil.checkEquals(storage_type, another.storage_type) &&
+        TUtil.checkEquals(location, another.location) &&
+        TUtil.checkEquals(subquery, another.subquery) &&
+        TUtil.checkEquals(params, another.params);
+  }
+
+  public static class ColumnDefinition {
+    String col_name;
+    String data_type;
+
+    public ColumnDefinition(String columnName, String dataType) {
+      this.col_name = columnName;
+      this.data_type = dataType;
+    }
+
+    public String getColumnName() {
+      return this.col_name;
+    }
+
+    public String getDataType() {
+      return this.data_type;
+    }
+
+    public boolean equals(Object obj) {
+      if (obj instanceof ColumnDefinition) {
+        ColumnDefinition another = (ColumnDefinition) obj;
+        return col_name.equals(another.col_name) && data_type.equals(another.data_type);
+      }
+
+      return false;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/bc6359b8/tajo-algebra/src/main/java/org/apache/tajo/algebra/Expr.java
----------------------------------------------------------------------
diff --git a/tajo-algebra/src/main/java/org/apache/tajo/algebra/Expr.java b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Expr.java
new file mode 100644
index 0000000..041ce1d
--- /dev/null
+++ b/tajo-algebra/src/main/java/org/apache/tajo/algebra/Expr.java
@@ -0,0 +1,98 @@
+/**
+ * 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.tajo.algebra;
+
+import com.google.gson.*;
+
+import java.lang.reflect.Type;
+
+public abstract class Expr implements JsonSerializable {
+  protected ExprType op_type;
+
+	public Expr(ExprType op_type) {
+		this.op_type = op_type;
+	}
+	
+	public ExprType getType() {
+		return this.op_type;
+	}
+
+  abstract boolean equalsTo(Expr expr);
+
+	@Override
+	public boolean equals(Object obj) {
+	  if (obj instanceof Expr) {
+	    Expr casted = (Expr) obj;
+
+      if (this.op_type == casted.op_type && equalsTo(casted)) {
+        if (this instanceof UnaryOperator) {
+          UnaryOperator one = (UnaryOperator) this;
+          UnaryOperator another = (UnaryOperator) casted;
+          return one.getChild().equals(another.getChild());
+        } else if (this instanceof BinaryOperator) {
+
+          BinaryOperator bin = (BinaryOperator) this;
+          BinaryOperator anotherBin = (BinaryOperator) casted;
+
+          if (!bin.getLeft().equals(anotherBin.getLeft())) {
+            return false;
+          }
+          if (!bin.getRight().equals(anotherBin.getRight())) {
+            return false;
+          }
+
+          return true;
+        } else {
+          return this.equalsTo(casted);
+        }
+      }
+	  }
+
+    return false;
+	}
+
+  @Override
+  public String toString() {
+    return toJson();
+  }
+
+  public String toJson() {
+    return JsonHelper.toJson(this);
+  }
+
+  static class JsonSerDer
+      implements JsonSerializer<Expr>, JsonDeserializer<Expr> {
+
+    @Override
+    public Expr deserialize(JsonElement json, Type typeOfT,
+                                    JsonDeserializationContext context)
+        throws JsonParseException {
+      JsonObject jsonObject = json.getAsJsonObject();
+      String operator = jsonObject.get("type").getAsString();
+      return context.deserialize(json, ExprType.valueOf(operator).getBaseClass());
+    }
+
+
+    @Override
+    public JsonElement serialize(Expr src, Type typeOfSrc,
+                                 JsonSerializationContext context) {
+      return context.serialize(src, src.op_type.getBaseClass());
+    }
+  }
+}


Mime
View raw message