tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [14/14] tajo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into index_support
Date Tue, 12 May 2015 03:14:13 GMT
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into index_support


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

Branch: refs/heads/index_support
Commit: 6f4409629d4bcca6487ab17905b375648938cdb0
Parents: 410ca31 53ed1c3
Author: Jihoon Son <jihoonson@apache.org>
Authored: Tue May 12 12:13:43 2015 +0900
Committer: Jihoon Son <jihoonson@apache.org>
Committed: Tue May 12 12:13:43 2015 +0900

----------------------------------------------------------------------
 CHANGES                                         |  14 +
 .../org/apache/tajo/catalog/CatalogUtil.java    |  36 +-
 .../org/apache/tajo/catalog/DDLBuilder.java     |   6 +-
 .../org/apache/tajo/catalog/NestedPathUtil.java | 109 ++++++
 .../java/org/apache/tajo/catalog/Schema.java    | 109 +++++-
 .../org/apache/tajo/catalog/SchemaUtil.java     |  33 +-
 .../java/org/apache/tajo/catalog/TableDesc.java |   5 +-
 .../java/org/apache/tajo/catalog/TableMeta.java |   8 +-
 .../tajo/catalog/json/TableMetaAdapter.java     |   7 +-
 .../apache/tajo/function/FunctionSignature.java |  10 +-
 .../org/apache/tajo/function/FunctionUtil.java  |  39 +++
 .../src/main/proto/CatalogProtos.proto          |   2 +-
 .../org/apache/tajo/catalog/TestTableDesc.java  |   5 +-
 .../org/apache/tajo/catalog/TestTableMeta.java  |  12 +-
 .../tajo/catalog/store/HiveCatalogStore.java    |  26 +-
 .../catalog/store/TestHiveCatalogStore.java     |  22 +-
 .../dictionary/AbstractTableDescriptor.java     |   2 +-
 .../tajo/catalog/store/AbstractDBStore.java     |   8 +-
 .../org/apache/tajo/catalog/store/MemStore.java |   2 +-
 .../org/apache/tajo/catalog/TestCatalog.java    |  24 +-
 .../org/apache/tajo/cli/tools/TajoDump.java     |   2 +-
 .../cli/tsql/DefaultTajoCliOutputFormatter.java |   4 +-
 .../cli/tsql/commands/DescFunctionCommand.java  |  18 +-
 .../cli/tsql/commands/DescTableCommand.java     |   7 +-
 .../org/apache/tajo/storage/RowStoreUtil.java   |   2 +-
 .../java/org/apache/tajo/BuiltinStorages.java   |  32 ++
 .../java/org/apache/tajo/storage/Tuple.java     |   2 +-
 .../java/org/apache/tajo/util/StringUtils.java  |  70 ++++
 .../main/java/org/apache/tajo/util/TUtil.java   |  32 --
 .../org/apache/tajo/engine/parser/SQLParser.g4  |   2 +-
 .../java/org/apache/tajo/benchmark/TPCH.java    |   2 +-
 .../apache/tajo/engine/parser/SQLAnalyzer.java  |  17 +-
 .../engine/planner/PhysicalPlannerImpl.java     |  30 +-
 .../tajo/engine/planner/global/DataChannel.java |  10 +-
 .../engine/planner/global/GlobalPlanner.java    |  16 +-
 .../global/builder/DistinctGroupbyBuilder.java  |   6 +-
 .../DistinctGroupbyThirdAggregationExec.java    |   2 +-
 .../planner/physical/ExternalSortExec.java      |   4 +-
 .../planner/physical/PhysicalPlanUtil.java      |  56 ++--
 .../physical/RangeShuffleFileWriteExec.java     |   2 +-
 .../engine/planner/physical/SeqScanExec.java    |  27 +-
 .../tajo/engine/utils/TupleCacheScanner.java    |   2 +-
 .../org/apache/tajo/engine/utils/TupleUtil.java |   8 +-
 .../org/apache/tajo/master/GlobalEngine.java    |   2 +-
 .../apache/tajo/master/exec/DDLExecutor.java    |   3 +-
 .../exec/NonForwardQueryResultFileScanner.java  |   2 +-
 .../NonForwardQueryResultSystemScanner.java     |  22 +-
 .../apache/tajo/master/exec/QueryExecutor.java  |   6 +-
 .../java/org/apache/tajo/querymaster/Query.java |   4 +-
 .../tajo/querymaster/QueryMasterTask.java       |   2 +-
 .../apache/tajo/querymaster/Repartitioner.java  |   4 +-
 .../java/org/apache/tajo/querymaster/Stage.java |   4 +-
 .../main/java/org/apache/tajo/util/JSPUtil.java |  14 -
 .../tajo/worker/ExecutionBlockContext.java      |  15 +-
 .../java/org/apache/tajo/worker/TaskRunner.java |   1 +
 .../src/main/proto/TajoWorkerProtocol.proto     |   2 +-
 .../resources/webapps/admin/catalogview.jsp     |   5 +-
 .../main/resources/webapps/admin/functions.jsp  |   3 +-
 .../org/apache/tajo/BackendTestingUtil.java     |   2 +-
 .../apache/tajo/LocalTajoTestingUtility.java    |   2 +-
 .../org/apache/tajo/TajoTestingCluster.java     |   2 +-
 .../apache/tajo/cli/tools/TestDDLBuilder.java   |   2 +-
 .../cli/tsql/TestDefaultCliOutputFormatter.java |  13 +-
 .../apache/tajo/engine/eval/ExprTestBase.java   |   4 +-
 .../tajo/engine/eval/TestEvalTreeUtil.java      |   2 +-
 .../engine/function/TestFunctionLoader.java     |   5 +-
 .../engine/planner/TestLogicalOptimizer.java    |   6 +-
 .../tajo/engine/planner/TestLogicalPlanner.java |  18 +-
 .../tajo/engine/planner/TestPlannerUtil.java    |   9 +-
 .../planner/global/TestBroadcastJoinPlan.java   |   2 +-
 .../planner/physical/TestBNLJoinExec.java       |   4 +-
 .../planner/physical/TestExternalSortExec.java  |   2 +-
 .../physical/TestFullOuterHashJoinExec.java     |   8 +-
 .../physical/TestFullOuterMergeJoinExec.java    |  11 +-
 .../planner/physical/TestHashAntiJoinExec.java  |   4 +-
 .../planner/physical/TestHashJoinExec.java      |   4 +-
 .../planner/physical/TestHashSemiJoinExec.java  |   4 +-
 .../physical/TestLeftOuterHashJoinExec.java     |   8 +-
 .../physical/TestLeftOuterNLJoinExec.java       |   8 +-
 .../planner/physical/TestMergeJoinExec.java     |   4 +-
 .../engine/planner/physical/TestNLJoinExec.java |   4 +-
 .../planner/physical/TestPhysicalPlanner.java   |  14 +-
 .../physical/TestProgressExternalSortExec.java  |   2 +-
 .../physical/TestRightOuterHashJoinExec.java    |   6 +-
 .../physical/TestRightOuterMergeJoinExec.java   |  10 +-
 .../engine/planner/physical/TestSortExec.java   |   2 +-
 .../apache/tajo/engine/query/TestCTASQuery.java |  10 +-
 .../tajo/engine/query/TestHBaseTable.java       |  10 +-
 .../tajo/engine/query/TestJoinBroadcast.java    |   2 +-
 .../engine/query/TestSelectNestedRecord.java    |  71 ++++
 .../org/apache/tajo/jdbc/TestResultSet.java     |   3 +-
 .../java/org/apache/tajo/jdbc/TestTajoJdbc.java |   2 +-
 .../tajo/master/TestExecutionBlockCursor.java   |   2 +-
 .../apache/tajo/master/TestGlobalPlanner.java   |   2 +-
 .../org/apache/tajo/storage/TestRowFile.java    |   2 +-
 .../rs/resources/TestQueryResultResource.java   |   6 +-
 .../ws/rs/resources/TestTablesResource.java     |  31 +-
 .../TestSelectNestedRecord/sample1/table.json   |   3 +
 .../TestSelectNestedRecord/tweets/sample1.json  |   4 +
 .../TestSelectNestedRecord/sample1_ddl.sql      |   7 +
 .../TestSelectNestedRecord/sample2_ddl.sql      |  19 ++
 .../testNestedFieldAsGroupbyKey1.sql            |   7 +
 .../testNestedFieldAsJoinKey1.sql               |   7 +
 .../TestSelectNestedRecord/testSelect1.sql      |   1 +
 .../TestSelectNestedRecord/testSelect2.sql      |  61 ++++
 .../TestSelectNestedRecord/tweets_ddl.sql       |  74 +++++
 .../testSelectWithParentheses2.sql              |   2 +-
 .../testNestedFieldAsGroupbyKey1.result         |   6 +
 .../testNestedFieldAsJoinKey1.result            |   6 +
 .../TestSelectNestedRecord/testSelect1.result   |   5 +
 .../TestSelectNestedRecord/testSelect2.result   |   6 +
 .../apache/tajo/jdbc/TajoDatabaseMetaData.java  |   2 +-
 .../tajo/plan/LogicalPlanPreprocessor.java      |   4 +-
 .../org/apache/tajo/plan/LogicalPlanner.java    |  41 ++-
 .../apache/tajo/plan/expr/RowConstantEval.java  |   3 +-
 .../tajo/plan/expr/WindowFunctionEval.java      |   3 +-
 .../function/python/PythonScriptEngine.java     |  14 +-
 .../GreedyHeuristicJoinOrderAlgorithm.java      |   8 +-
 .../apache/tajo/plan/joinorder/JoinEdge.java    |   4 +-
 .../apache/tajo/plan/joinorder/JoinGraph.java   |   6 +-
 .../tajo/plan/logical/DistinctGroupbyNode.java  |   4 +-
 .../apache/tajo/plan/logical/EvalExprNode.java  |   3 +-
 .../apache/tajo/plan/logical/GroupbyNode.java   |  10 +-
 .../tajo/plan/logical/PersistentStoreNode.java  |   8 +-
 .../tajo/plan/logical/ProjectionNode.java       |   3 +-
 .../apache/tajo/plan/logical/RelationNode.java  |  12 +
 .../tajo/plan/logical/ShuffleFileWriteNode.java |   5 +-
 .../tajo/plan/logical/StoreTableNode.java       |   2 +-
 .../tajo/plan/logical/TruncateTableNode.java    |   4 +-
 .../apache/tajo/plan/logical/WindowAggNode.java |   7 +-
 .../tajo/plan/nameresolver/NameResolver.java    | 194 ++++++++---
 .../plan/nameresolver/ResolverByLegacy.java     |   8 +-
 .../plan/rewrite/rules/FilterPushDownRule.java  |   4 +-
 .../rewrite/rules/PartitionedTableRewriter.java |   4 +-
 .../org/apache/tajo/plan/util/PlannerUtil.java  |  18 +-
 .../tajo/plan/verifier/LogicalPlanVerifier.java |  24 +-
 .../plan/verifier/PreLogicalPlanVerifier.java   |   9 +-
 tajo-plan/src/main/proto/Plan.proto             |   2 +-
 .../org/apache/tajo/plan/TestLogicalNode.java   |   6 +-
 .../org/apache/tajo/rpc/AsyncRpcServer.java     |   6 +-
 .../org/apache/tajo/rpc/BlockingRpcServer.java  |   6 +-
 .../org/apache/tajo/storage/MergeScanner.java   |   2 +-
 .../org/apache/tajo/storage/RowStoreUtil.java   |   2 +-
 .../java/org/apache/tajo/storage/Scanner.java   |   9 +
 .../org/apache/tajo/storage/StorageManager.java |  51 +--
 .../storage/hbase/AbstractHBaseAppender.java    |   2 -
 .../storage/hbase/AddSortForInsertRewriter.java |   4 +-
 .../tajo/storage/hbase/ColumnMapping.java       |   2 +-
 .../HBaseBinarySerializerDeserializer.java      |  10 +-
 .../tajo/storage/hbase/HBasePutAppender.java    |   3 +-
 .../apache/tajo/storage/hbase/HBaseScanner.java |  25 +-
 .../tajo/storage/hbase/HBaseStorageManager.java |   9 +-
 .../tajo/storage/hbase/TestColumnMapping.java   |   3 +-
 .../storage/hbase/TestHBaseStorageManager.java  |   2 +-
 .../java/org/apache/tajo/storage/CSVFile.java   |   2 +-
 .../org/apache/tajo/storage/FileScanner.java    |   2 +-
 .../apache/tajo/storage/FileStorageManager.java |   9 +-
 .../apache/tajo/storage/avro/AvroScanner.java   |  25 +-
 .../tajo/storage/json/JsonLineDeserializer.java | 331 +++++++++++--------
 .../apache/tajo/storage/json/JsonLineSerDe.java |   5 +-
 .../tajo/storage/json/JsonLineSerializer.java   |   2 -
 .../storage/parquet/TajoRecordConverter.java    |   7 +-
 .../org/apache/tajo/storage/rcfile/RCFile.java  |  10 +-
 .../sequencefile/SequenceFileScanner.java       |  16 +-
 .../tajo/storage/text/CSVLineDeserializer.java  |  26 +-
 .../apache/tajo/storage/text/CSVLineSerDe.java  |   5 +-
 .../tajo/storage/text/DelimitedTextFile.java    |  11 +-
 .../tajo/storage/text/TextLineDeserializer.java |   4 +-
 .../apache/tajo/storage/text/TextLineSerDe.java |   3 +-
 .../tajo/storage/TestCompressionStorages.java   |  22 +-
 .../tajo/storage/TestDelimitedTextFile.java     |   8 +-
 .../tajo/storage/TestFileStorageManager.java    |  10 +-
 .../apache/tajo/storage/TestFileSystems.java    |   2 +-
 .../org/apache/tajo/storage/TestLineReader.java |   8 +-
 .../apache/tajo/storage/TestMergeScanner.java   |  49 +--
 .../org/apache/tajo/storage/TestStorages.java   |  86 ++---
 .../apache/tajo/storage/avro/TestAvroUtil.java  |   7 +-
 .../apache/tajo/storage/index/TestBSTIndex.java |  10 +-
 .../index/TestSingleCSVFileBSTIndex.java        |   4 +-
 .../apache/tajo/storage/json/TestJsonSerDe.java |   2 +-
 180 files changed, 1741 insertions(+), 905 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/CHANGES
----------------------------------------------------------------------
diff --cc CHANGES
index 67d656f,73fd2f3..42d9b36
--- a/CHANGES
+++ b/CHANGES
@@@ -114,8 -123,8 +123,10 @@@ Release 0.11.0 - unrelease
  
    BUG FIXES
  
 +    TAJO-1594: Catalog schema is invalid for some databases. (jihoon)
 +
+     TAJO-1593: Add missing stop condition to Taskrunner. (jinho)
+ 
      TAJO-1556: "insert into select" with reordered column list does not work.
      (Contributed by Yongjin Choi, Committed by jihoon)
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/CatalogUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/TableDesc.java
----------------------------------------------------------------------
diff --cc tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/TableDesc.java
index f3f71ba,17f9146..e44076a
--- a/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/TableDesc.java
+++ b/tajo-catalog/tajo-catalog-common/src/main/java/org/apache/tajo/catalog/TableDesc.java
@@@ -22,9 -22,11 +22,8 @@@ import com.google.common.base.Objects
  import com.google.gson.Gson;
  import com.google.gson.GsonBuilder;
  import com.google.gson.annotations.Expose;
 -
 -import org.apache.commons.logging.Log;
 -import org.apache.commons.logging.LogFactory;
  import org.apache.tajo.catalog.json.CatalogGsonHelper;
  import org.apache.tajo.catalog.partition.PartitionMethodDesc;
- import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
  import org.apache.tajo.catalog.proto.CatalogProtos.TableDescProto;
  import org.apache.tajo.catalog.statistics.TableStats;
  import org.apache.tajo.common.ProtoObject;

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-common/src/main/proto/CatalogProtos.proto
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-drivers/tajo-hive/src/main/java/org/apache/tajo/catalog/store/HiveCatalogStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/AbstractDBStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/store/MemStore.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
----------------------------------------------------------------------
diff --cc tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
index 1c17cae,cbcec83..884b97d
--- a/tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
+++ b/tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
@@@ -547,9 -561,9 +547,9 @@@ public class TestCatalog 
  
      String tableName = "indexed";
  
-     TableMeta meta = CatalogUtil.newTableMeta(StoreType.CSV);
+     TableMeta meta = CatalogUtil.newTableMeta("CSV");
      return new TableDesc(
 -        CatalogUtil.buildFQName(TajoConstants.DEFAULT_DATABASE_NAME, tableName), schema,
meta,
 +        CatalogUtil.buildFQName(TajoConstants.DEFAULT_DATABASE_NAME, tableName), relationSchema,
meta,
          new Path(CommonTestingUtil.getTestDir(), "indexed").toUri());
    }
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/DescTableCommand.java
----------------------------------------------------------------------
diff --cc tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/DescTableCommand.java
index cbe17b7,6df26b7..31dfb13
--- a/tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/DescTableCommand.java
+++ b/tajo-cli/src/main/java/org/apache/tajo/cli/tsql/commands/DescTableCommand.java
@@@ -24,12 -24,9 +24,11 @@@ import org.apache.tajo.TajoConstants
  import org.apache.tajo.catalog.Column;
  import org.apache.tajo.catalog.TableDesc;
  import org.apache.tajo.catalog.partition.PartitionMethodDesc;
 +import org.apache.tajo.catalog.proto.CatalogProtos.IndexDescProto;
 +import org.apache.tajo.catalog.proto.CatalogProtos.SortSpecProto;
  import org.apache.tajo.cli.tsql.TajoCli;
  import org.apache.tajo.util.FileUtil;
- import org.apache.tajo.util.TUtil;
+ import org.apache.tajo.util.StringUtils;
  
  import java.util.List;
  import java.util.Map;

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-common/src/main/java/org/apache/tajo/util/TUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/antlr4/org/apache/tajo/engine/parser/SQLParser.g4
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/engine/parser/SQLAnalyzer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java
----------------------------------------------------------------------
diff --cc tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java
index 313e6a3,506b03e..2dd7fa8
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/PhysicalPlannerImpl.java
@@@ -30,13 -30,12 +30,10 @@@ import org.apache.commons.logging.LogFa
  import org.apache.hadoop.fs.Path;
  import org.apache.tajo.SessionVars;
  import org.apache.tajo.catalog.Column;
--import org.apache.tajo.catalog.Schema;
  import org.apache.tajo.catalog.SortSpec;
  import org.apache.tajo.catalog.proto.CatalogProtos;
  import org.apache.tajo.catalog.proto.CatalogProtos.SortSpecProto;
  import org.apache.tajo.conf.TajoConf;
- import org.apache.tajo.datum.Datum;
--import org.apache.tajo.plan.serder.LogicalNodeDeserializer;
  import org.apache.tajo.engine.planner.enforce.Enforcer;
  import org.apache.tajo.engine.planner.global.DataChannel;
  import org.apache.tajo.engine.planner.physical.*;
@@@ -49,13 -48,14 +46,16 @@@ import org.apache.tajo.ipc.TajoWorkerPr
  import org.apache.tajo.ipc.TajoWorkerProtocol.DistinctGroupbyEnforcer.SortSpecArray;
  import org.apache.tajo.plan.LogicalPlan;
  import org.apache.tajo.plan.logical.*;
- import org.apache.tajo.plan.rewrite.rules.IndexScanInfo.SimplePredicate;
++import org.apache.tajo.plan.serder.LogicalNodeDeserializer;
  import org.apache.tajo.plan.util.PlannerUtil;
--import org.apache.tajo.storage.*;
++import org.apache.tajo.storage.FileStorageManager;
++import org.apache.tajo.storage.StorageConstants;
++import org.apache.tajo.storage.StorageManager;
  import org.apache.tajo.storage.fragment.FileFragment;
  import org.apache.tajo.storage.fragment.Fragment;
  import org.apache.tajo.storage.fragment.FragmentConvertor;
  import org.apache.tajo.util.FileUtil;
 -import org.apache.tajo.util.IndexUtil;
+ import org.apache.tajo.util.StringUtils;
  import org.apache.tajo.util.TUtil;
  import org.apache.tajo.worker.TaskAttemptContext;
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/engine/planner/global/GlobalPlanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/master/GlobalEngine.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/master/exec/DDLExecutor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
----------------------------------------------------------------------
diff --cc tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
index 9fb75db,6ae9677..1150007
--- a/tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
+++ b/tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
@@@ -293,35 -289,43 +293,35 @@@ public class NonForwardQueryResultSyste
      
      return tuples;
    }
 -  
 +
    private List<Tuple> getIndexes(Schema outSchema) {
 -    List<IndexProto> indexList = masterContext.getCatalog().getAllIndexes();
 +    List<IndexDescProto> indexList = masterContext.getCatalog().getAllIndexes();
      List<Tuple> tuples = new ArrayList<Tuple>(indexList.size());
-     List<Column> columns = outSchema.getColumns();
+     List<Column> columns = outSchema.getRootColumns();
      Tuple aTuple;
 -    
 -    for (IndexProto index: indexList) {
 +
 +    for (IndexDescProto index: indexList) {
        aTuple = new VTuple(outSchema.size());
 -      
 +
        for (int fieldId = 0; fieldId < columns.size(); fieldId++) {
          Column column = columns.get(fieldId);
 -        
 +
          if ("db_id".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createInt4(index.getDbId()));
 +          aTuple.put(fieldId, DatumFactory.createInt4(index.getTableIdentifier().getDbId()));
          } else if ("tid".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createInt4(index.getTId()));
 +          aTuple.put(fieldId, DatumFactory.createInt4(index.getTableIdentifier().getTid()));
          } else if ("index_name".equalsIgnoreCase(column.getSimpleName())) {
            aTuple.put(fieldId, DatumFactory.createText(index.getIndexName()));
 -        } else if ("column_name".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createText(index.getColumnName()));
 -        } else if ("data_type".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createText(index.getDataType()));
 -        } else if ("index_type".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createText(index.getIndexType()));
 -        } else if ("is_unique".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createBool(index.getIsUnique()));
 -        } else if ("is_clustered".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createBool(index.getIsClustered()));
 -        } else if ("is_ascending".equalsIgnoreCase(column.getSimpleName())) {
 -          aTuple.put(fieldId, DatumFactory.createBool(index.getIsAscending()));
 +        } else if ("index_method".equalsIgnoreCase(column.getSimpleName())) {
 +          aTuple.put(fieldId, DatumFactory.createText(index.getIndexMethod().name()));
 +        } else if ("index_path".equalsIgnoreCase(column.getSimpleName())) {
 +          aTuple.put(fieldId, DatumFactory.createText(index.getIndexPath()));
          }
        }
 -      
 +
        tuples.add(aTuple);
      }
 -    
 +
      return tuples;
    }
    

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/master/exec/QueryExecutor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/querymaster/Query.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/main/java/org/apache/tajo/querymaster/QueryMasterTask.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/eval/ExprTestBase.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/TestLogicalOptimizer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/TestLogicalPlanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/global/TestBroadcastJoinPlan.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashAntiJoinExec.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestHashSemiJoinExec.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestPhysicalPlanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/engine/planner/physical/TestSortExec.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/master/TestExecutionBlockCursor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-core/src/test/java/org/apache/tajo/master/TestGlobalPlanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanPreprocessor.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
----------------------------------------------------------------------
diff --cc tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
index 0ea1e20,ce1e4ec..4d1d7a8
--- a/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
+++ b/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
@@@ -36,10 -36,8 +36,9 @@@ import org.apache.tajo.algebra.WindowSp
  import org.apache.tajo.catalog.*;
  import org.apache.tajo.catalog.partition.PartitionMethodDesc;
  import org.apache.tajo.catalog.proto.CatalogProtos;
 -import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
 +import org.apache.tajo.catalog.proto.CatalogProtos.IndexMethod;
- import org.apache.tajo.catalog.proto.CatalogProtos.StoreType;
  import org.apache.tajo.common.TajoDataTypes;
 +import org.apache.tajo.conf.TajoConf;
  import org.apache.tajo.datum.NullDatum;
  import org.apache.tajo.plan.LogicalPlan.QueryBlock;
  import org.apache.tajo.plan.algebra.BaseAlgebraVisitor;
@@@ -53,9 -51,10 +52,10 @@@ import org.apache.tajo.plan.util.Planne
  import org.apache.tajo.plan.verifier.VerifyException;
  import org.apache.tajo.util.KeyValueSet;
  import org.apache.tajo.util.Pair;
+ import org.apache.tajo.util.StringUtils;
  import org.apache.tajo.util.TUtil;
  
 +import java.net.URI;
  import java.util.*;
  
  import static org.apache.tajo.algebra.CreateTable.PartitionType;
@@@ -879,11 -878,17 +890,11 @@@ public class LogicalPlanner extends Bas
        } else if (block.namedExprsMgr.isEvaluated(refName)) {
          column = block.namedExprsMgr.getTarget(refName).getNamedColumn();
        } else {
-         throw new IllegalStateException("Unexpected State: " + TUtil.arrayToString(rawSortSpecs));
 -        throw new IllegalStateException("Unexpected State: " + StringUtils.join(sortSpecs));
++        throw new IllegalStateException("Unexpected State: " + StringUtils.join(rawSortSpecs));
        }
 -      annotatedSortSpecs.add(new SortSpec(column, sortSpecs[i].isAscending(), sortSpecs[i].isNullFirst()));
 -    }
 -
 -    if (annotatedSortSpecs.size() == 0) {
 -      return child;
 -    } else {
 -      sortNode.setSortSpecs(annotatedSortSpecs.toArray(new SortSpec[annotatedSortSpecs.size()]));
 -      return sortNode;
 +      annotatedSortSpecs.add(new SortSpec(column, rawSortSpecs[i].isAscending(), rawSortSpecs[i].isNullFirst()));
      }
 +    return annotatedSortSpecs.toArray(new SortSpec[annotatedSortSpecs.size()]);
    }
  
    /*===============================================================================================

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/FilterPushDownRule.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-plan/src/main/java/org/apache/tajo/plan/rewrite/rules/PartitionedTableRewriter.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-plan/src/main/java/org/apache/tajo/plan/util/PlannerUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-plan/src/main/proto/Plan.proto
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/6f440962/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
----------------------------------------------------------------------
diff --cc tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
index f9a57fa,32f1e43..c380a23
--- a/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
+++ b/tajo-storage/tajo-storage-hbase/src/main/java/org/apache/tajo/storage/hbase/AddSortForInsertRewriter.java
@@@ -18,7 -18,7 +18,6 @@@
  
  package org.apache.tajo.storage.hbase;
  
--import org.apache.tajo.OverridableConf;
  import org.apache.tajo.catalog.Column;
  import org.apache.tajo.catalog.Schema;
  import org.apache.tajo.catalog.SortSpec;
@@@ -55,8 -53,8 +53,8 @@@ public class AddSortForInsertRewriter i
    }
  
    @Override
 -  public boolean isEligible(OverridableConf queryContext, LogicalPlan plan) {
 -    String storeType = PlannerUtil.getStoreType(plan);
 +  public boolean isEligible(LogicalPlanRewriteRuleContext context) {
-     StoreType storeType = PlannerUtil.getStoreType(context.getPlan());
++    String storeType = PlannerUtil.getStoreType(context.getPlan());
      return storeType != null;
    }
  


Mime
View raw message