You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@drill.apache.org by ja...@apache.org on 2014/06/12 18:34:56 UTC
[05/24] git commit: DRILL-738: Add test for left,
right and replace function from sql
DRILL-738: Add test for left, right and replace function from sql
Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/fc54e8ee
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/fc54e8ee
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/fc54e8ee
Branch: refs/heads/master
Commit: fc54e8eef99410d43d584d1d270430ebbd652d62
Parents: ba4d1a6
Author: Mehant Baid <me...@gmail.com>
Authored: Tue Jun 10 14:07:11 2014 -0700
Committer: Jacques Nadeau <ja...@apache.org>
Committed: Wed Jun 11 09:03:24 2014 -0700
----------------------------------------------------------------------
.../java/org/apache/drill/jdbc/test/TestJdbcQuery.java | 13 +++++++++++++
1 file changed, 13 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/fc54e8ee/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
index a2438a1..501927c 100644
--- a/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
+++ b/exec/jdbc/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
@@ -402,4 +402,17 @@ public class TestJdbcQuery extends JdbcTest{
);
}
+ @Test
+ public void testLeftRightReplace() throws Exception {
+ JdbcAssert.withNoDefaultSchema()
+ .sql("SELECT `left`('abcdef', 2) as LEFT_STR, `right`('abcdef', 2) as RIGHT_STR, `replace`('abcdef', 'ab', 'zz') as REPLACE_STR " +
+ "from cp.`employee.json` limit 1")
+ .returns(
+ "LEFT_STR=ab; " +
+ "RIGHT_STR=ef; " +
+ "REPLACE_STR=zzcdef\n"
+ );
+ }
+
+
}