Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-5286

Negative test date_literal1.q fails on java7 because the syntax is valid

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.12.0
    • Fix Version/s: 0.13.0
    • Component/s: None
    • Labels:
      None

      Description

      [brock@bigboy java-date]$ cat Test.java 
      import java.sql.Date;
      public class Test {
        public static void main(String[] args) throws Exception {
          System.out.println(Date.valueOf("2001-1-1"));
        }
      }
      [brock@bigboy java-date]$ exec-via-java6 java -cp . Test
      Exception in thread "main" java.lang.IllegalArgumentException
      	at java.sql.Date.valueOf(Date.java:138)
      	at Test.main(Test.java:4)
      [brock@bigboy java-date]$ exec-via-java7 java -cp . Test
      2001-01-01
      

        Attachments

        1. HIVE-5286.patch
          0.6 kB
          Szehon Ho

          Activity

            People

            • Assignee:
              szehon Szehon Ho
              Reporter:
              brocknoland Brock Noland
            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: