You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by GitBox <gi...@apache.org> on 2020/03/28 13:22:57 UTC

[GitHub] [drill] arina-ielchiieva commented on a change in pull request #2043: DRILL-7673: View set query fails with NPE for non-existing option

arina-ielchiieva commented on a change in pull request #2043: DRILL-7673: View set query fails with NPE for non-existing option
URL: https://github.com/apache/drill/pull/2043#discussion_r399662074
 
 

 ##########
 File path: exec/java-exec/src/test/java/org/apache/drill/exec/planner/sql/handlers/SetOptionHandlerTest.java
 ##########
 @@ -59,32 +63,41 @@ public void testSimpleSetQuery() throws Exception {
 
   @Test
   public void testViewSetQuery() throws Exception {
-    client.testBuilder()  // BIT
+    testBuilder()  // BIT
         .sqlQuery("SET `%s`", ExecConstants.ENABLE_ITERATOR_VALIDATION_OPTION)
         .unOrdered()
         .sqlBaselineQuery("SELECT name, val as value FROM sys.options where name = '%s' limit 1",
             ExecConstants.ENABLE_ITERATOR_VALIDATION_OPTION)
         .go();
 
-    client.testBuilder()  // BIGINT
+    testBuilder()  // BIGINT
         .sqlQuery("SET `%s`", ExecConstants.OUTPUT_BATCH_SIZE)
         .unOrdered()
         .sqlBaselineQuery("SELECT name, val as value FROM sys.options where name = '%s' limit 1",
             ExecConstants.OUTPUT_BATCH_SIZE)
         .go();
 
-    client.testBuilder()  // FLOAT
+    testBuilder()  // FLOAT
         .sqlQuery("SET `%s`", ExecConstants.OUTPUT_BATCH_SIZE_AVAIL_MEM_FACTOR)
         .unOrdered()
         .sqlBaselineQuery("SELECT name, val as value FROM sys.options where name = '%s' limit 1",
             ExecConstants.OUTPUT_BATCH_SIZE_AVAIL_MEM_FACTOR)
         .go();
 
-    client.testBuilder()  // VARCHAR
+    testBuilder()  // VARCHAR
         .sqlQuery("SET `%s`", ExecConstants.FILESYSTEM_PARTITION_COLUMN_LABEL)
         .unOrdered()
         .sqlBaselineQuery("SELECT name, val as value FROM sys.options where name = '%s' limit 1",
             ExecConstants.FILESYSTEM_PARTITION_COLUMN_LABEL)
         .go();
   }
+
+  @Test
+  public void testViewSetWithIncorrectOption() throws Exception {
+    try {
+      run("set `non-existing option`");
 
 Review comment:
   Add fail() to ensure method call has failed...

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services