tajo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jihoon...@apache.org
Subject [1/2] git commit: Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/tajo into index_support
Date Sun, 19 Oct 2014 11:22:25 GMT
Repository: tajo
Updated Branches:
  refs/heads/index_support 738c3a1de -> 322da3885


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/cd613507
Tree: http://git-wip-us.apache.org/repos/asf/tajo/tree/cd613507
Diff: http://git-wip-us.apache.org/repos/asf/tajo/diff/cd613507

Branch: refs/heads/index_support
Commit: cd613507907440acd652341138c6d76a1e9ae568
Parents: f98b78c 2e32f5a
Author: Jihoon Son <jihoonson@apache.org>
Authored: Sun Oct 19 20:21:55 2014 +0900
Committer: Jihoon Son <jihoonson@apache.org>
Committed: Sun Oct 19 20:21:55 2014 +0900

----------------------------------------------------------------------
 CHANGES                                         |  20 ++
 .../main/java/org/apache/tajo/DataTypeUtil.java | 181 ++++++++++
 .../org/apache/tajo/catalog/CatalogUtil.java    | 232 +++++++------
 .../org/apache/tajo/catalog/FunctionDesc.java   | 167 +++++-----
 .../exception/NoSuchFunctionException.java      |   6 +-
 .../apache/tajo/catalog/function/Function.java  |  65 ----
 .../tajo/catalog/json/CatalogGsonHelper.java    |   2 +-
 .../tajo/catalog/json/FunctionAdapter.java      |   2 +-
 .../tajo/function/ClassBaseInvocationDesc.java  |  71 ++++
 .../java/org/apache/tajo/function/Function.java |  66 ++++
 .../tajo/function/FunctionCollection.java       |  29 ++
 .../tajo/function/FunctionInvocation.java       | 154 +++++++++
 .../apache/tajo/function/FunctionSignature.java | 141 ++++++++
 .../tajo/function/FunctionSupplement.java       | 113 +++++++
 .../org/apache/tajo/function/FunctionUtil.java  |  56 ++++
 .../apache/tajo/function/ScalarFunction.java    |  44 +++
 .../function/StaticMethodInvocationDesc.java    | 135 ++++++++
 .../src/main/proto/CatalogProtos.proto          |  75 +++--
 .../apache/tajo/catalog/TestCatalogUtil.java    |  14 +-
 .../apache/tajo/catalog/TestFunctionDesc.java   |   6 +-
 .../org/apache/tajo/catalog/CatalogServer.java  |  96 ++++--
 .../tajo/catalog/store/PostgreSQLStore.java     | 332 +++++++++++++++++++
 .../resources/schemas/postgresql/columns.sql    |   9 +
 .../resources/schemas/postgresql/databases.sql  |   6 +
 .../resources/schemas/postgresql/indexes.sql    |  14 +
 .../schemas/postgresql/partition_methods.sql    |   7 +
 .../resources/schemas/postgresql/partitions.sql |  10 +
 .../main/resources/schemas/postgresql/stats.sql |   6 +
 .../schemas/postgresql/table_properties.sql     |   7 +
 .../resources/schemas/postgresql/tables.sql     |   9 +
 .../schemas/postgresql/tablespaces.sql          |   6 +
 .../org/apache/tajo/catalog/TestCatalog.java    |  29 +-
 .../apache/tajo/cli/DescFunctionCommand.java    |  38 ++-
 .../apache/tajo/json/ClassNameSerializer.java   |   3 +-
 .../java/org/apache/tajo/util/ClassUtil.java    | 201 +++++++++++
 .../main/java/org/apache/tajo/util/TUtil.java   |   4 +-
 .../tajo/engine/codegen/CaseWhenEmitter.java    |  27 +-
 .../tajo/engine/codegen/EvalCodeGenerator.java  |  51 +--
 .../codegen/LegacyFunctionBindingEmitter.java   |  75 +++++
 .../codegen/ScalarFunctionBindingEmitter.java   | 164 +++++++++
 .../engine/codegen/TajoGeneratorAdapter.java    |  60 ++++
 .../engine/codegen/VariablesPreBuilder.java     |   2 +-
 .../apache/tajo/engine/eval/AlgebraicUtil.java  |   2 +-
 .../org/apache/tajo/engine/eval/BinaryEval.java |   2 +-
 .../apache/tajo/engine/eval/FunctionEval.java   |   4 +-
 .../tajo/engine/eval/WindowFunctionEval.java    |   2 +-
 .../tajo/engine/function/AggFunction.java       |   3 +-
 .../tajo/engine/function/FunctionLoader.java    | 239 +++++++++++++
 .../tajo/engine/function/GeneralFunction.java   |   3 +-
 .../tajo/engine/function/builtin/AvgInt.java    |   1 -
 .../engine/function/math/MathFunctions.java     |  46 +++
 .../apache/tajo/engine/function/math/Pow.java   |  26 +-
 .../apache/tajo/engine/json/CoreGsonHelper.java |   2 +-
 .../optimizer/eval/rules/ConstantFolding.java   |   2 +-
 .../engine/plan/EvalTreeProtoDeserializer.java  |   4 +-
 .../tajo/engine/planner/ExprAnnotator.java      | 113 +------
 .../tajo/engine/planner/TypeDeterminant.java    |   6 +-
 .../planner/logical/TruncateTableNode.java      |   2 +-
 .../join/GreedyHeuristicJoinOrderAlgorithm.java |   4 +-
 .../engine/planner/logical/join/JoinEdge.java   |   2 +-
 .../engine/planner/logical/join/JoinGraph.java  |   5 +-
 .../apache/tajo/engine/utils/DataTypeUtil.java  | 121 -------
 .../java/org/apache/tajo/master/TajoMaster.java |  85 +----
 .../tajo/master/TajoMasterClientService.java    |   3 +-
 .../java/org/apache/tajo/util/ClassUtil.java    | 156 ---------
 .../main/java/org/apache/tajo/util/JSPUtil.java |   2 +-
 .../main/resources/webapps/admin/functions.jsp  |   2 +-
 .../apache/tajo/LocalTajoTestingUtility.java    |  21 ++
 .../org/apache/tajo/client/TestTajoClient.java  |   2 +-
 .../apache/tajo/engine/eval/ExprTestBase.java   |   4 +-
 .../tajo/engine/eval/TestEvalTreeUtil.java      |   3 +-
 .../engine/function/TestFunctionLoader.java     |  46 +++
 .../tajo/engine/function/TestMathFunctions.java |   2 +
 .../tajo/engine/planner/TestExprAnnotator.java  |  12 +-
 .../engine/planner/TestLogicalOptimizer.java    |   3 +-
 .../tajo/engine/planner/TestLogicalPlanner.java |   3 +-
 .../planner/global/TestBroadcastJoinPlan.java   |   3 +-
 .../planner/physical/TestPhysicalPlanner.java   |   3 +-
 .../apache/tajo/master/TestGlobalPlanner.java   |   3 +-
 .../testFindScalarFunctions.result              |   2 +
 80 files changed, 2771 insertions(+), 908 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tajo/blob/cd613507/tajo-catalog/tajo-catalog-common/src/main/proto/CatalogProtos.proto
----------------------------------------------------------------------
diff --cc tajo-catalog/tajo-catalog-common/src/main/proto/CatalogProtos.proto
index 38b57a1,db402ae..3d2cd21
--- a/tajo-catalog/tajo-catalog-common/src/main/proto/CatalogProtos.proto
+++ b/tajo-catalog/tajo-catalog-common/src/main/proto/CatalogProtos.proto
@@@ -115,37 -115,14 +115,15 @@@ message NamespaceProto 
    optional string namespace = 2;
  }
  
- enum FunctionType {
-   GENERAL = 0;
-   AGGREGATION = 1;
-   DISTINCT_AGGREGATION = 2;
-   WINDOW = 3;
-   UDF = 4;
-   UDA = 5;
-   DISTINCT_UDA = 6;
-   WINDOW_UDA = 7;
- }
- 
- message FunctionDescProto {
-   required string signature = 1;
-   required string className = 2;
-   required FunctionType type = 3;
-   repeated DataType parameterTypes = 4;
-   required DataType returnType = 5;
-   optional string description = 6;
-   optional string example = 7;
-   optional string detail = 8;
- }
- 
  message IndexDescProto {
    required TableIdentifierProto tableIdentifier = 1;
 -  required string indexName = 2;
 -  required ColumnProto column = 3;
 -  required IndexMethod indexMethod = 4;
 -  optional bool isUnique = 5 [default = false];
 -  optional bool isClustered = 6 [default = false];
 -  optional bool isAscending = 7 [default = false];
 +  required string name = 2;
 +  required string indexPath = 3;
 +  required ColumnProto column = 4;
 +  required IndexMethod indexMethod = 5;
 +  optional bool isUnique = 6 [default = false];
 +  optional bool isClustered = 7 [default = false];
 +  optional bool isAscending = 8 [default = false];
  }
  
  enum IndexMethod {
@@@ -301,3 -278,56 +279,56 @@@ message AlterColumnProto 
    required string oldColumnName = 1;
    required string newColumnName = 2;
  }
+ 
+ ////////////////////////////////////////////////
+ // Function and UDF Section
+ ////////////////////////////////////////////////
+ 
+ enum FunctionType {
+   GENERAL = 0;
+   AGGREGATION = 1;
+   DISTINCT_AGGREGATION = 2;
+   WINDOW = 3;
+   UDF = 4;
+   UDA = 5;
+   DISTINCT_UDA = 6;
+   WINDOW_UDA = 7;
+ }
+ 
+ message FunctionDescProto {
+   required FunctionSignatureProto signature = 1;
+   required FunctionSupplementProto supplement = 2;
+   required FunctionInvocationProto invocation = 3;
+ }
+ 
+ message FunctionSignatureProto {
+   required FunctionType type = 1;
+   required string name = 2;
+   required DataType returnType = 3;
+   repeated DataType parameterTypes = 4;
+ }
+ 
+ message FunctionSupplementProto {
+   optional string shortDescription = 1;
+   optional string detail = 2;
+   optional string example = 3;
+ }
+ 
+ message FunctionInvocationProto {
+   optional ClassBaseInvocationDescProto legacy = 1;
+   optional StaticMethodInvocationDescProto scalar = 2;
+   optional ClassBaseInvocationDescProto aggregation = 3;
+   optional StaticMethodInvocationDescProto scalarJIT = 4;
+   optional ClassBaseInvocationDescProto aggregationJIT = 5;
+ }
+ 
+ message ClassBaseInvocationDescProto {
+   required string className = 1;
+ }
+ 
+ message StaticMethodInvocationDescProto {
+   required string className = 1;
+   required string methodName = 2;
+   required string returnClass = 3;
+   repeated string paramClasses = 4;
 -}
++}

http://git-wip-us.apache.org/repos/asf/tajo/blob/cd613507/tajo-catalog/tajo-catalog-server/src/main/java/org/apache/tajo/catalog/CatalogServer.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/tajo/blob/cd613507/tajo-catalog/tajo-catalog-server/src/test/java/org/apache/tajo/catalog/TestCatalog.java
----------------------------------------------------------------------

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

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


Mime
View raw message