tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [7/7] tajo git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into index_support
Date Thu, 02 Apr 2015 11:06:00 GMT
Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into index_support

Conflicts:
	tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mariadb/indexes.sql
	tajo-catalog/tajo-catalog-server/src/main/resources/schemas/mysql/indexes.sql


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

Branch: refs/heads/index_support
Commit: 3c182347dc9dec633fcce1a77fc66a2a6b89272f
Parents: 1c53ccf f4c9e54
Author: Jihoon Son <jihoonson@apache.org>
Authored: Thu Apr 2 20:05:41 2015 +0900
Committer: Jihoon Son <jihoonson@apache.org>
Committed: Thu Apr 2 20:05:41 2015 +0900

----------------------------------------------------------------------
 CHANGES                                         |  14 +
 .../store/AbstractMySQLMariaDBStore.java        | 311 --------------
 .../apache/tajo/catalog/store/MariaDBStore.java |  26 +-
 .../apache/tajo/catalog/store/MySQLStore.java   |  29 +-
 .../src/main/resources/schemas/common/meta.sql  |   1 -
 .../src/main/resources/schemas/derby/derby.xml  |  16 +-
 .../main/resources/schemas/mariadb/columns.sql  |  10 -
 .../resources/schemas/mariadb/databases.sql     |   7 -
 .../main/resources/schemas/mariadb/indexes.sql  |  19 -
 .../main/resources/schemas/mariadb/mariadb.xml  | 161 ++++++++
 .../schemas/mariadb/partition_keys.sql          |   6 -
 .../schemas/mariadb/partition_methods.sql       |   7 -
 .../resources/schemas/mariadb/partitions.sql    |   7 -
 .../main/resources/schemas/mariadb/stats.sql    |   6 -
 .../schemas/mariadb/table_properties.sql        |   7 -
 .../main/resources/schemas/mariadb/tables.sql   |  11 -
 .../resources/schemas/mariadb/tablespaces.sql   |   7 -
 .../main/resources/schemas/mysql/columns.sql    |  10 -
 .../main/resources/schemas/mysql/databases.sql  |   7 -
 .../main/resources/schemas/mysql/indexes.sql    |  19 -
 .../src/main/resources/schemas/mysql/mysql.xml  | 162 ++++++++
 .../resources/schemas/mysql/partition_keys.sql  |   6 -
 .../schemas/mysql/partition_methods.sql         |   7 -
 .../main/resources/schemas/mysql/partitions.sql |   7 -
 .../src/main/resources/schemas/mysql/stats.sql  |   6 -
 .../schemas/mysql/table_properties.sql          |   7 -
 .../src/main/resources/schemas/mysql/tables.sql |  11 -
 .../resources/schemas/mysql/tablespaces.sql     |   7 -
 .../main/resources/schemas/oracle/oracle.xml    |  21 +-
 .../resources/schemas/postgresql/postgresql.xml |  28 +-
 .../java/org/apache/tajo/conf/TajoConf.java     |   2 +-
 .../tajo/engine/codegen/CaseWhenEmitter.java    |   4 +-
 .../tajo/engine/codegen/EvalCodeGenContext.java |   2 +-
 .../tajo/engine/codegen/EvalCodeGenerator.java  |  22 +-
 .../apache/tajo/engine/planner/Projector.java   |   9 +-
 .../planner/physical/AggregationExec.java       |  11 +-
 .../engine/planner/physical/BNLJoinExec.java    |  43 +-
 .../planner/physical/BSTIndexScanExec.java      |   6 +-
 .../engine/planner/physical/CommonJoinExec.java |  79 ++++
 .../planner/physical/ComparableVector.java      | 411 +++++++++++++++++++
 .../DistinctGroupbyFirstAggregationExec.java    |  20 +-
 .../DistinctGroupbyHashAggregationExec.java     |  33 +-
 .../DistinctGroupbySecondAggregationExec.java   |   8 +-
 .../DistinctGroupbyThirdAggregationExec.java    |   7 +-
 .../engine/planner/physical/EvalExprExec.java   |   6 +-
 .../planner/physical/ExternalSortExec.java      | 238 ++++-------
 .../planner/physical/HashAggregateExec.java     |   4 +-
 .../planner/physical/HashFullOuterJoinExec.java |  33 +-
 .../engine/planner/physical/HashJoinExec.java   |  32 +-
 .../planner/physical/HashLeftAntiJoinExec.java  |   2 +-
 .../planner/physical/HashLeftOuterJoinExec.java |   9 +-
 .../planner/physical/HashLeftSemiJoinExec.java  |  14 +-
 .../engine/planner/physical/HavingExec.java     |   8 +-
 .../engine/planner/physical/MemSortExec.java    |  19 +-
 .../physical/MergeFullOuterJoinExec.java        |  34 +-
 .../engine/planner/physical/MergeJoinExec.java  |  30 +-
 .../engine/planner/physical/NLJoinExec.java     |  30 +-
 .../planner/physical/NLLeftOuterJoinExec.java   |  28 +-
 .../physical/RightOuterMergeJoinExec.java       |  35 +-
 .../engine/planner/physical/SelectionExec.java  |   8 +-
 .../engine/planner/physical/SeqScanExec.java    |  31 +-
 .../planner/physical/SortAggregateExec.java     |   6 +-
 .../tajo/engine/planner/physical/SortExec.java  |  10 +-
 .../engine/planner/physical/TupleSorter.java    |  24 +-
 .../planner/physical/VectorizedSorter.java      | 155 +------
 .../engine/planner/physical/WindowAggExec.java  |  11 +-
 .../org/apache/tajo/engine/utils/TupleUtil.java |   4 +-
 .../NonForwardQueryResultSystemScanner.java     |   2 +-
 .../apache/tajo/master/exec/QueryExecutor.java  |   2 +-
 .../apache/tajo/engine/eval/ExprTestBase.java   |   3 +-
 .../apache/tajo/engine/eval/TestEvalTree.java   |  68 +--
 .../tajo/engine/eval/TestEvalTreeUtil.java      |  12 +-
 .../planner/physical/TestExternalSortExec.java  |   4 +-
 .../planner/physical/TestTupleSorter.java       |   2 +-
 .../testCrossJoinWithAsterisk1.sql              |   2 +-
 .../testCrossJoinWithAsterisk2.sql              |   2 +-
 .../testCrossJoinWithAsterisk3.sql              |   2 +-
 .../testCrossJoinWithAsterisk4.sql              |   2 +-
 .../TestJoinQuery/testComplexJoinCondition7.sql |   2 +-
 .../testCrossJoinWithAsterisk1.sql              |   2 +-
 .../testCrossJoinWithAsterisk2.sql              |   2 +-
 .../testCrossJoinWithAsterisk3.sql              |   2 +-
 .../testCrossJoinWithAsterisk4.sql              |   2 +-
 .../queries/TestJoinQuery/testJoinWithJson.json |   8 +
 .../testComplexJoinCondition7.result            |   4 +-
 .../org/apache/tajo/plan/LogicalPlanner.java    |   2 +-
 .../plan/expr/AggregationFunctionCallEval.java  |  22 +-
 .../apache/tajo/plan/expr/AlgebraicUtil.java    |   6 +-
 .../tajo/plan/expr/BetweenPredicateEval.java    |  79 ++--
 .../org/apache/tajo/plan/expr/BinaryEval.java   |  10 +-
 .../org/apache/tajo/plan/expr/CaseWhenEval.java |  23 +-
 .../org/apache/tajo/plan/expr/CastEval.java     |   7 +-
 .../org/apache/tajo/plan/expr/ConstEval.java    |   7 +-
 .../org/apache/tajo/plan/expr/EvalNode.java     |  12 +-
 .../org/apache/tajo/plan/expr/EvalTreeUtil.java |   3 +-
 .../org/apache/tajo/plan/expr/FieldEval.java    |  29 +-
 .../org/apache/tajo/plan/expr/FunctionEval.java |  50 +--
 .../tajo/plan/expr/GeneralFunctionEval.java     |  25 +-
 .../java/org/apache/tajo/plan/expr/InEval.java  |   5 +-
 .../org/apache/tajo/plan/expr/IsNullEval.java   |   6 +-
 .../java/org/apache/tajo/plan/expr/NotEval.java |   6 +-
 .../tajo/plan/expr/PartialBinaryExpr.java       |   5 +-
 .../plan/expr/PatternMatchPredicateEval.java    |  12 +-
 .../apache/tajo/plan/expr/RowConstantEval.java  |   4 +-
 .../org/apache/tajo/plan/expr/SignedEval.java   |   6 +-
 .../org/apache/tajo/plan/expr/UnaryEval.java    |   3 +-
 .../tajo/plan/expr/WindowFunctionEval.java      |  21 +-
 .../plan/exprrewrite/rules/ConstantFolding.java |  17 +-
 .../rewrite/rules/PartitionedTableRewriter.java |   3 +-
 .../org/apache/tajo/rpc/NettyClientBase.java    |  26 +-
 .../org/apache/tajo/rpc/RpcConnectionPool.java  |  19 +-
 .../apache/tajo/storage/AbstractScanner.java    |  80 ++++
 .../org/apache/tajo/storage/MemoryUtil.java     |   4 +
 113 files changed, 1535 insertions(+), 1451 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/derby/derby.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/oracle/oracle.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-catalog/tajo-catalog-server/src/main/resources/schemas/postgresql/postgresql.xml
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
----------------------------------------------------------------------
diff --cc tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
index fa3559f,221b341..3c70cb2
--- a/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
+++ b/tajo-common/src/main/java/org/apache/tajo/conf/TajoConf.java
@@@ -326,12 -326,8 +326,12 @@@ public class TajoConf extends Configura
      $EXECUTOR_GROUPBY_INMEMORY_HASH_THRESHOLD("tajo.executor.groupby.in-memory-hash-threshold-bytes",
          (long)256 * 1048576),
      $MAX_OUTPUT_FILE_SIZE("tajo.query.max-outfile-size-mb", 0), // zero means infinite
-     $CODEGEN("tajo.executor.codegen.enabled", false), // Runtime code generation
+     $CODEGEN("tajo.executor.codegen.enabled", false), // Runtime code generation (todo this
is broken)
  
 +    // for index
 +    $INDEX_ENABLED("tajo.query.index.enabled", false),
 +    $INDEX_SELECTIVITY_THRESHOLD("tajo.query.index.selectivity.threshold", 0.05f),
 +
      // Client -----------------------------------------------------------------
      $CLIENT_SESSION_EXPIRY_TIME("tajo.client.session.expiry-time-sec", 3600), // default
time is one hour.
  

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
----------------------------------------------------------------------
diff --cc tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
index 3e4c62d,be6c046..c7169bb
--- a/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
+++ b/tajo-core/src/main/java/org/apache/tajo/engine/planner/physical/BSTIndexScanExec.java
@@@ -92,26 -67,13 +92,30 @@@ public class BSTIndexScanExec extends P
      this.reader.open();
    }
  
 +  private static Schema mergeSubSchemas(Schema originalSchema, Schema subSchema, Target[]
targets, EvalNode qual) {
 +    Schema mergedSchema = new Schema();
 +    Set<Column> qualAndTargets = TUtil.newHashSet();
 +    qualAndTargets.addAll(EvalTreeUtil.findUniqueColumns(qual));
 +    for (Target target : targets) {
 +      qualAndTargets.addAll(EvalTreeUtil.findUniqueColumns(target.getEvalTree()));
 +    }
 +    for (Column column : originalSchema.getColumns()) {
 +      if (subSchema.contains(column)
 +          || qualAndTargets.contains(column)
 +          || qualAndTargets.contains(column)) {
 +        mergedSchema.addColumn(column);
 +      }
 +    }
 +    return mergedSchema;
 +  }
 +
    @Override
    public void init() throws IOException {
+     super.init();
      progress = 0.0f;
+     if (qual != null) {
+       qual.bind(inSchema);
+     }
    }
  
    @Override

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-core/src/main/java/org/apache/tajo/master/exec/NonForwardQueryResultSystemScanner.java
----------------------------------------------------------------------

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

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

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-plan/src/main/java/org/apache/tajo/plan/LogicalPlanner.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-plan/src/main/java/org/apache/tajo/plan/expr/AlgebraicUtil.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/3c182347/tajo-plan/src/main/java/org/apache/tajo/plan/expr/EvalTreeUtil.java
----------------------------------------------------------------------

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


Mime
View raw message