diff options
author | Vitalii Diravka <vitalii.diravka@gmail.com> | 2016-05-13 19:24:31 +0000 |
---|---|---|
committer | Parth Chandra <parthc@apache.org> | 2016-07-22 21:28:08 -0700 |
commit | f36fec9750fedd00a063f26b9998f9a994d025ad (patch) | |
tree | b1f19dc0b49afac1491e4e9f66532e0b6f9f7221 /contrib/storage-hive/core/src/test/java/org/apache/drill | |
parent | 5ca2340a0a83412aa8fc8b077b72eca5f55e4226 (diff) |
DRILL-4673: Implement "DROP TABLE IF EXISTS" for drill to prevent FAILED status on command return - implement DROP TABLE IF EXISTS and DROP VIEW IF EXISTS; - added unit test for DROP TABLE IF EXISTS; - added unit test for DROP VIEW IF EXISTS; - added unit test for "IF" hive UDF.
This closes #541
Diffstat (limited to 'contrib/storage-hive/core/src/test/java/org/apache/drill')
-rw-r--r-- | contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java index 93c93748e..9e13844ae 100644 --- a/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java +++ b/contrib/storage-hive/core/src/test/java/org/apache/drill/exec/fn/hive/TestInbuiltHiveUDFs.java @@ -23,7 +23,6 @@ import org.apache.drill.TestBuilder; import org.apache.drill.common.expression.SchemaPath; import org.apache.drill.common.types.TypeProtos; import org.apache.drill.exec.hive.HiveTestBase; -import org.apache.drill.exec.rpc.user.QueryDataBatch; import org.junit.Test; import java.util.List; @@ -84,4 +83,15 @@ public class TestInbuiltHiveUDFs extends HiveTestBase { "first_name","Bh","last_name","Venkata","position","Store")) .go(); } + + @Test // DRILL-3272 + public void testIf() throws Exception { + testBuilder() + .sqlQuery("select `if`(1999 > 2000, 'latest', 'old') Period from hive.kv limit 1") + .ordered() + .baselineColumns("Period") + .baselineValues("old") + .go(); + } + } |