kylin-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From shaofeng...@apache.org
Subject incubator-kylin git commit: KYLIN-943 add topN to “without_slr” test cubes
Date Tue, 29 Sep 2015 03:20:21 GMT
Repository: incubator-kylin
Updated Branches:
  refs/heads/2.x-staging d1d874c2f -> 5dd8ee18f


KYLIN-943 add topN to “without_slr” test cubes

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

Branch: refs/heads/2.x-staging
Commit: 5dd8ee18fa73d7a708168f26a1d656fc1e1738d3
Parents: d1d874c
Author: shaofengshi <shaofengshi@apache.org>
Authored: Tue Sep 29 11:19:49 2015 +0800
Committer: shaofengshi <shaofengshi@apache.org>
Committed: Tue Sep 29 11:19:49 2015 +0800

----------------------------------------------------------------------
 .../kylin/job/BuildCubeWithEngineTest.java      | 32 ++------------------
 .../test_kylin_cube_without_slr_desc.json       | 25 +++++++++++++++
 ...t_kylin_cube_without_slr_left_join_desc.json | 25 +++++++++++++++
 .../localmeta/project/default.json              | 10 ------
 4 files changed, 52 insertions(+), 40 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5dd8ee18/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
----------------------------------------------------------------------
diff --git a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
index 029c263..5be11f1 100644
--- a/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
+++ b/assembly/src/test/java/org/apache/kylin/job/BuildCubeWithEngineTest.java
@@ -128,12 +128,12 @@ public class BuildCubeWithEngineTest {
     }
 
     private void testInner() throws Exception {
-       String[] testCase = new String[] { "testInnerJoinCube", "testInnerJoinCube2", "testInnerJoinCube3"};
+        String[] testCase = new String[] { "testInnerJoinCube", "testInnerJoinCube2" };
         runTestAndAssertSucceed(testCase);
     }
 
     private void testLeft() throws Exception {
-        String[] testCase = new String[] { "testLeftJoinCube", "testLeftJoinCube2", "testLeftJoinCube3"
};
+        String[] testCase = new String[] { "testLeftJoinCube", "testLeftJoinCube2" };
         runTestAndAssertSucceed(testCase);
     }
 
@@ -188,20 +188,6 @@ public class BuildCubeWithEngineTest {
 
     @SuppressWarnings("unused")
     // called by reflection
-    private List<String> testInnerJoinCube3() throws Exception {
-        clearSegment("test_kylin_cube_topn");
-        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
-        f.setTimeZone(TimeZone.getTimeZone("GMT"));
-        long date1 = 0;
-        long date2 = f.parse("2022-01-01").getTime();
-        List<String> result = Lists.newArrayList();
-        result.add(buildSegment("test_kylin_cube_topn", date1, date2));
-        return result;
-    }
-    
-
-    @SuppressWarnings("unused")
-    // called by reflection
     private List<String> testInnerJoinCube2() throws Exception {
         clearSegment("test_kylin_cube_with_slr_empty");
         SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
@@ -233,20 +219,6 @@ public class BuildCubeWithEngineTest {
         result.add(buildSegment("test_kylin_cube_without_slr_empty", date1, date2));
         return result;
     }
-
-    @SuppressWarnings("unused")
-    // called by reflection
-    private List<String> testLeftJoinCube3() throws Exception {
-        clearSegment("test_kylin_cube_topn_left_join");
-        SimpleDateFormat f = new SimpleDateFormat("yyyy-MM-dd");
-        f.setTimeZone(TimeZone.getTimeZone("GMT"));
-        long date1 = 0;
-        long date2 = f.parse("2022-01-01").getTime();
-        List<String> result = Lists.newArrayList();
-        result.add(buildSegment("test_kylin_cube_topn_left_join", date1, date2));
-        return result;
-    }
-
     
     @SuppressWarnings("unused")
     // called by reflection

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5dd8ee18/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
index 76675f5..c54b205 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_desc.json
@@ -162,6 +162,20 @@
         "returntype": "hllc(10)"
       },
       "dependent_measure_ref": null
+    },
+    {
+      "id": 8,
+      "name": "TOP_SELLER",
+      "function": {
+        "expression": "TOP_N",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "displaycolumn": "seller_id"
+        },
+        "returntype": "topn(100)"
+      },
+      "dependent_measure_ref": null
     }
   ],
   "rowkey": {
@@ -261,6 +275,17 @@
             ]
           }
         ]
+      },
+      {
+        "name": "f3",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "top_seller"
+            ]
+          }
+        ]
       }
     ]
   },

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5dd8ee18/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
index d3be1c9..b4428cc 100644
--- a/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
+++ b/examples/test_case_data/localmeta/cube_desc/test_kylin_cube_without_slr_left_join_desc.json
@@ -162,6 +162,20 @@
         "returntype": "hllc(10)"
       },
       "dependent_measure_ref": null
+    },
+    {
+      "id": 8,
+      "name": "TOP_SELLER",
+      "function": {
+        "expression": "TOP_N",
+        "parameter": {
+          "type": "column",
+          "value": "PRICE",
+          "displaycolumn": "seller_id"
+        },
+        "returntype": "topn(100)"
+      },
+      "dependent_measure_ref": null
     }
   ],
   "rowkey": {
@@ -261,6 +275,17 @@
             ]
           }
         ]
+      },
+      {
+        "name": "f3",
+        "columns": [
+          {
+            "qualifier": "m",
+            "measure_refs": [
+              "top_seller"
+            ]
+          }
+        ]
       }
     ]
   },

http://git-wip-us.apache.org/repos/asf/incubator-kylin/blob/5dd8ee18/examples/test_case_data/localmeta/project/default.json
----------------------------------------------------------------------
diff --git a/examples/test_case_data/localmeta/project/default.json b/examples/test_case_data/localmeta/project/default.json
index ac6fdb5..e4118ca 100644
--- a/examples/test_case_data/localmeta/project/default.json
+++ b/examples/test_case_data/localmeta/project/default.json
@@ -46,16 +46,6 @@
       "name": "test_kylin_hybrid_inner_join",
       "type": "HYBRID",
       "realization": "test_kylin_hybrid_inner_join"
-    },
-    {
-      "name": "test_kylin_cube_topn",
-      "type": "CUBE",
-      "realization": "test_kylin_cube_topn"
-    },
-    {
-      "name": "test_kylin_cube_topn_left_join",
-      "type": "CUBE",
-      "realization": "test_kylin_cube_topn_left_join"
     }
   ]
 }
\ No newline at end of file


Mime
View raw message