jihoonson commented on a change in pull request #5958: Part 2 of changes for
SQL Compatible Null Handling
URL: https://github.com/apache/incubator-druid/pull/5958#discussion_r204916109
##########
File path:
extensions-core/lookups-cached-single/src/test/java/io/druid/server/lookup/LoadingLookupTest.java
##########
@@ -43,13 +44,20 @@
public void testApplyEmptyOrNull()
{
Assert.assertEquals(null, loadingLookup.apply(null));
- Assert.assertEquals(null, loadingLookup.apply(""));
+ if (NullHandling.sqlCompatible()) {
+ // empty string should also have same behavior
+ Assert.assertEquals(null, loadingLookup.apply(""));
+ }
Review comment:
Can be `Assert.assertNull()`.
Also, do we need to test for non-sql-compatible mode? Like:
```java
Assert.assertNull(loadingLookup.apply(null));
if (NullHandling.sqlCompatible()) {
// empty string should also have same behavior
Assert.assertNull(loadingLookup.apply(""));
} else {
Assert.assertEquals("", loadingLookup.apply(""));
}
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]