diff options
author | Aditya Kishore <aditya@maprtech.com> | 2014-04-25 16:02:32 -0700 |
---|---|---|
committer | Jacques Nadeau <jacques@apache.org> | 2014-05-03 18:46:30 -0700 |
commit | beeaf9e8fb482cc2bde1838e5f152bff130d4135 (patch) | |
tree | 05257b3afc6a0c40ef9f1d0d85f445042bb208ae /exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java | |
parent | 2bfa2c122511891b03aeea8cf88aa1fe4660ab31 (diff) |
DRILL-452: Conversion functions for external data types
* Length need not be a parameter in varchar* functions.
* Added test cases for UTF8 conversion.
Diffstat (limited to 'exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java')
-rw-r--r-- | exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java index 881495cfe..6476e0b28 100644 --- a/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java +++ b/exec/java-exec/src/test/java/org/apache/drill/exec/physical/impl/TestConvertFunctions.java @@ -348,6 +348,13 @@ public class TestConvertFunctions extends PopUnitTestBase { } @Test + public void testUTF8(@Injectable final DrillbitContext bitContext, + @Injectable UserServer.UserClientConnection connection) throws Throwable { + runTest(bitContext, connection, "convert_from(binary_string('apache_drill'), 'UTF8')", "apache_drill"); + runTest(bitContext, connection, "convert_to('apache_drill', 'UTF8')", new byte[] {'a', 'p', 'a', 'c', 'h', 'e', '_', 'd', 'r', 'i', 'l', 'l'}); + } + + @Test public void testBigIntVarCharReturnTripConvertLogical() throws Exception { RemoteServiceSet serviceSet = RemoteServiceSet.getLocalServiceSet(); |