You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tajo.apache.org by hy...@apache.org on 2013/12/03 02:55:36 UTC
git commit: TAJO-357: Fix invalid filename TestMethFunction to
TestMathFUnction. (DaeMyung Kang via hyunsik)
Updated Branches:
refs/heads/master 43ec04aaa -> b3d754e28
TAJO-357: Fix invalid filename TestMethFunction to TestMathFUnction. (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/b3d754e2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tajo/tree/b3d754e2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tajo/diff/b3d754e2
Branch: refs/heads/master
Commit: b3d754e288c0a6004d8e2ade94ad51e690ac0041
Parents: 43ec04a
Author: Hyunsik Choi <hy...@apache.org>
Authored: Tue Dec 3 10:55:07 2013 +0900
Committer: Hyunsik Choi <hy...@apache.org>
Committed: Tue Dec 3 10:55:07 2013 +0900
----------------------------------------------------------------------
CHANGES.txt | 3 +
.../java/org/apache/tajo/master/TajoMaster.java | 4 +-
.../tajo/engine/function/TestMathFunctions.java | 83 ++++++++++++++++++++
.../tajo/engine/function/TestMethFunction.java | 83 --------------------
4 files changed, 87 insertions(+), 86 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b3d754e2/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 0ad8c3c..b4ab394 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,9 @@ Release 0.8.0 - unreleased
NEW FEATURES
+ TAJO-357: Fix invalid filename TestMethFunction to TestMathFUnction.
+ (DaeMyung Kang via hyunsik)
+
TAJO-352: Implement right/left(text, size) function.
(DaeMyung Kang via hyunsik)
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b3d754e2/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
index 2fe4213..0ea3c73 100644
--- a/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
+++ b/tajo-core/tajo-core-backend/src/main/java/org/apache/tajo/master/TajoMaster.java
@@ -46,9 +46,7 @@ import org.apache.tajo.conf.TajoConf.ConfVars;
import org.apache.tajo.engine.function.Country;
import org.apache.tajo.engine.function.InCountry;
import org.apache.tajo.engine.function.builtin.*;
-import org.apache.tajo.engine.function.math.Ceil;
-import org.apache.tajo.engine.function.math.Floor;
-import org.apache.tajo.engine.function.math.Round;
+import org.apache.tajo.engine.function.math.*;
import org.apache.tajo.engine.function.string.*;
import org.apache.tajo.master.querymaster.QueryJobManager;
import org.apache.tajo.master.rm.TajoWorkerResourceManager;
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b3d754e2/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
new file mode 100644
index 0000000..6a59b7a
--- /dev/null
+++ b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMathFunctions.java
@@ -0,0 +1,83 @@
+/**
+ * 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.engine.function;
+
+import org.apache.tajo.catalog.Schema;
+import org.apache.tajo.engine.eval.ExprTestBase;
+import org.junit.Test;
+
+import java.io.IOException;
+
+import static org.apache.tajo.common.TajoDataTypes.Type.FLOAT8;
+
+public class TestMathFunctions extends ExprTestBase {
+ @Test
+ public void testRound() throws IOException {
+ testSimpleEval("select round(5.1) as col1 ", new String[]{"5"});
+ testSimpleEval("select round(5.5) as col1 ", new String[]{"6"});
+ testSimpleEval("select round(5.6) as col1 ", new String[]{"6"});
+
+// testSimpleEval("select round(-5.1) as col1 ", new String[]{"-5"});
+// testSimpleEval("select round(-5.5) as col1 ", new String[]{"-6"});
+// testSimpleEval("select round(-5.6) as col1 ", new String[]{"-6"});
+
+ Schema schema = new Schema();
+ schema.addColumn("col1", FLOAT8);
+ schema.addColumn("col2", FLOAT8);
+ schema.addColumn("col3", FLOAT8);
+
+ testEval(schema, "table1", "1.0, 0.2, 0.4", "select round(col1 + col2 + col3) from table1",
+ new String[]{"2"});
+ }
+
+ @Test
+ public void testFloor() throws IOException {
+ testSimpleEval("select floor(5.1) as col1 ", new String[]{"5"});
+ testSimpleEval("select floor(5.5) as col1 ", new String[]{"5"});
+ testSimpleEval("select floor(5.6) as col1 ", new String[]{"5"});
+// testSimpleEval("select floor(-5.1) as col1 ", new String[]{"-6"});
+// testSimpleEval("select floor(-5.6) as col1 ", new String[]{"-6"});
+
+ Schema schema = new Schema();
+ schema.addColumn("col1", FLOAT8);
+ schema.addColumn("col2", FLOAT8);
+ schema.addColumn("col3", FLOAT8);
+
+ testEval(schema, "table1", "1.0, 0.2, 0.4", "select floor(col1 + col2 + col3) from table1",
+ new String[]{"1"});
+ }
+
+ @Test
+ public void testCeil() throws IOException {
+ testSimpleEval("select ceil(5.0) as col1 ", new String[]{"5"});
+ testSimpleEval("select ceil(5.1) as col1 ", new String[]{"6"});
+ testSimpleEval("select ceil(5.5) as col1 ", new String[]{"6"});
+ testSimpleEval("select ceil(5.6) as col1 ", new String[]{"6"});
+// testSimpleEval("select ceil(-5.1) as col1 ", new String[]{"-5"});
+// testSimpleEval("select ceil(-5.6) as col1 ", new String[]{"-5"});
+
+ Schema schema = new Schema();
+ schema.addColumn("col1", FLOAT8);
+ schema.addColumn("col2", FLOAT8);
+ schema.addColumn("col3", FLOAT8);
+
+ testEval(schema, "table1", "1.0, 0.2, 0.1", "select ceil(col1 + col2 + col3) from table1",
+ new String[]{"2"});
+ }
+}
http://git-wip-us.apache.org/repos/asf/incubator-tajo/blob/b3d754e2/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMethFunction.java
----------------------------------------------------------------------
diff --git a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMethFunction.java b/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMethFunction.java
deleted file mode 100644
index 77b0443..0000000
--- a/tajo-core/tajo-core-backend/src/test/java/org/apache/tajo/engine/function/TestMethFunction.java
+++ /dev/null
@@ -1,83 +0,0 @@
-/**
- * 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.engine.function;
-
-import org.apache.tajo.catalog.Schema;
-import org.apache.tajo.engine.eval.ExprTestBase;
-import org.junit.Test;
-
-import java.io.IOException;
-
-import static org.apache.tajo.common.TajoDataTypes.Type.FLOAT8;
-
-public class TestMethFunction extends ExprTestBase {
- @Test
- public void testRound() throws IOException {
- testSimpleEval("select round(5.1) as col1 ", new String[]{"5"});
- testSimpleEval("select round(5.5) as col1 ", new String[]{"6"});
- testSimpleEval("select round(5.6) as col1 ", new String[]{"6"});
-
-// testSimpleEval("select round(-5.1) as col1 ", new String[]{"-5"});
-// testSimpleEval("select round(-5.5) as col1 ", new String[]{"-6"});
-// testSimpleEval("select round(-5.6) as col1 ", new String[]{"-6"});
-
- Schema schema = new Schema();
- schema.addColumn("col1", FLOAT8);
- schema.addColumn("col2", FLOAT8);
- schema.addColumn("col3", FLOAT8);
-
- testEval(schema, "table1", "1.0, 0.2, 0.4", "select round(col1 + col2 + col3) from table1",
- new String[]{"2"});
- }
-
- @Test
- public void testFloor() throws IOException {
- testSimpleEval("select floor(5.1) as col1 ", new String[]{"5"});
- testSimpleEval("select floor(5.5) as col1 ", new String[]{"5"});
- testSimpleEval("select floor(5.6) as col1 ", new String[]{"5"});
-// testSimpleEval("select floor(-5.1) as col1 ", new String[]{"-6"});
-// testSimpleEval("select floor(-5.6) as col1 ", new String[]{"-6"});
-
- Schema schema = new Schema();
- schema.addColumn("col1", FLOAT8);
- schema.addColumn("col2", FLOAT8);
- schema.addColumn("col3", FLOAT8);
-
- testEval(schema, "table1", "1.0, 0.2, 0.4", "select floor(col1 + col2 + col3) from table1",
- new String[]{"1"});
- }
-
- @Test
- public void testCeil() throws IOException {
- testSimpleEval("select ceil(5.0) as col1 ", new String[]{"5"});
- testSimpleEval("select ceil(5.1) as col1 ", new String[]{"6"});
- testSimpleEval("select ceil(5.5) as col1 ", new String[]{"6"});
- testSimpleEval("select ceil(5.6) as col1 ", new String[]{"6"});
-// testSimpleEval("select ceil(-5.1) as col1 ", new String[]{"-5"});
-// testSimpleEval("select ceil(-5.6) as col1 ", new String[]{"-5"});
-
- Schema schema = new Schema();
- schema.addColumn("col1", FLOAT8);
- schema.addColumn("col2", FLOAT8);
- schema.addColumn("col3", FLOAT8);
-
- testEval(schema, "table1", "1.0, 0.2, 0.1", "select ceil(col1 + col2 + col3) from table1",
- new String[]{"2"});
- }
-}