MaxGekk commented on a change in pull request #26010: [WIP][SPARK-29342][SQL] 
Make casting of string values to intervals case insensitive
URL: https://github.com/apache/spark/pull/26010#discussion_r331413004
 
 

 ##########
 File path: 
common/unsafe/src/test/java/org/apache/spark/unsafe/types/CalendarIntervalSuite.java
 ##########
 @@ -104,31 +104,6 @@ public void fromStringTest() {
     assertNull(fromString(input));
   }
 
-  @Test
-  public void fromCaseInsensitiveStringTest() {
-    for (String input : new String[]{"5 MINUTES", "5 minutes", "5 Minutes"}) {
-      assertEquals(fromCaseInsensitiveString(input), new CalendarInterval(0, 
5L * 60 * 1_000_000));
-    }
-
-    for (String input : new String[]{null, "", " "}) {
-      try {
-        fromCaseInsensitiveString(input);
-        fail("Expected to throw an exception for the invalid input");
-      } catch (IllegalArgumentException e) {
-        assertTrue(e.getMessage().contains("cannot be null or blank"));
-      }
-    }
-
-    for (String input : new String[]{"interval", "interval1 day", "foo", "foo 
1 day"}) {
-      try {
-        fromCaseInsensitiveString(input);
-        fail("Expected to throw an exception for the invalid input");
-      } catch (IllegalArgumentException e) {
-        assertTrue(e.getMessage().contains("Invalid interval"));
-      }
-    }
 
 Review comment:
   Reverted

----------------------------------------------------------------
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]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to