drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [3/8] git commit: DRILL-1098: Add test for trim(), substring() function. Actual fix is in OPTIQ-331
Date Tue, 08 Jul 2014 01:01:15 GMT
DRILL-1098: Add test for trim(), substring() function.
Actual fix is in OPTIQ-331


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

Branch: refs/heads/master
Commit: cd4f7267de975f89aef775860532d49220ee8e88
Parents: dcc94a3
Author: Mehant Baid <mehantr@gmail.com>
Authored: Thu Jul 3 00:09:17 2014 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Mon Jul 7 14:50:31 2014 -0700

----------------------------------------------------------------------
 .../org/apache/drill/jdbc/test/TestFunctionsQuery.java   | 11 +++++++++++
 1 file changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/cd4f7267/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestFunctionsQuery.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestFunctionsQuery.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestFunctionsQuery.java
index 9337f61..99c85e5 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestFunctionsQuery.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestFunctionsQuery.java
@@ -690,4 +690,15 @@ public class TestFunctionsQuery {
         .returns(
             "NEG=-2\n");
   }
+
+  @Test
+  public void testOptiqValidationFunctions() throws Exception {
+    String query = "select trim(first_name) as TRIM_STR, substring(first_name, 2) as SUB_STR
" +
+                   "from cp.`employee.json` where employee_id = 1";
+
+    JdbcAssert.withNoDefaultSchema()
+        .sql(query)
+        .returns("TRIM_STR=Sheri; "+
+                 "SUB_STR=heri\n");
+  }
 }


Mime
View raw message