[ 
https://issues.apache.org/jira/browse/HIVE-24315?focusedWorklogId=569858&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-569858
 ]

ASF GitHub Bot logged work on HIVE-24315:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 22/Mar/21 16:58
            Start Date: 22/Mar/21 16:58
    Worklog Time Spent: 10m 
      Work Description: zeroflag commented on a change in pull request #2059:
URL: https://github.com/apache/hive/pull/2059#discussion_r598905700



##########
File path: hplsql/src/test/java/org/apache/hive/hplsql/TestHplsqlLocal.java
##########
@@ -407,19 +408,68 @@ public void testWhile() throws Exception {
     run("while");
   }
 
+  @Test
+  public void testArity() throws Exception {
+    run("arity");
+  }
+
+  @Test
+  public void testTypeCheck() throws Exception {
+    run("type_check");
+  }
+
+  @Test
+  public void testUndefFunc() throws Exception {
+    run("undef_func");
+  }
+
+  @Test
+  public void testUndefVar() throws Exception {
+    run("undef_var");
+  }
+
+  @Test
+  public void testNull() throws Exception {
+    run("null");
+  }
+
+  @Test
+  public void testFuncNoReturn() throws Exception {
+    run("func_no_return");
+  }
+
+  @Test
+  public void testInvalidSyntax() throws Exception {
+    run("invalid_syntax");
+  }
+
+  @Test
+  public void testPrecedence() throws Exception {
+    run("preced");
+  }
+
+  @Test
+  public void testConversion() throws Exception {
+    run("conversion");
+  }
+
+
   /**
    * Run a test file
    */
   void run(String testFile) throws Exception {
     System.setOut(new PrintStream(out));
+    System.setErr(new PrintStream(err));
     Exec exec = new Exec();
     String[] args = { "-f", "src/test/queries/local/" + testFile + ".sql", 
"-trace" };
     exec.run(args);
-    String s = getTestOutput(out.toString()).trim();
-    FileUtils.writeStringToFile(new java.io.File("target/tmp/log/" + testFile 
+ ".out.txt"), s);
+    String sout = getTestOutput(out.toString()).trim();

Review comment:
       Ok, this broke lots of tests, I updated those outputs.




-- 
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:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 569858)
    Time Spent: 2h 40m  (was: 2.5h)

> Improve validation and error handling in HPL/SQL 
> -------------------------------------------------
>
>                 Key: HIVE-24315
>                 URL: https://issues.apache.org/jira/browse/HIVE-24315
>             Project: Hive
>          Issue Type: Sub-task
>          Components: hpl/sql
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h 40m
>  Remaining Estimate: 0h
>
> There are some known issues that need to be fixed. For example it seems that 
> arity of a function is not checked when calling it, and same is true for 
> parameter types. Calling an undefined function is evaluated to null and 
> sometimes it seems that incorrect syntax is silently ignored. 
> In cases like this a helpful error message would be expected, thought we 
> should also consider how PL/SQL works and maintain compatibility.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to