You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by "Mengwei Ding (JIRA)" <ji...@apache.org> on 2013/08/05 22:26:49 UTC

[jira] [Commented] (SQOOP-827) Sqoop2: MMapInput is null while retrieving from DB if pass empty map on write

    [ https://issues.apache.org/jira/browse/SQOOP-827?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13729893#comment-13729893 ] 

Mengwei Ding commented on SQOOP-827:
------------------------------------

[~jarcec]

I checked the test code in TestMMapInput.java. It has the follow test case:

{code}
  public void testUrlSafe() {
    MMapInput input1 = new MMapInput("sqoopsqoop", false);
    Map<String, String> map1 = new HashMap<String, String>();
    input1.setValue(map1);
    // Getting URL safe string
    String tmp = input1.getUrlSafeValueString();
    // Restore to actual value
    input1.restoreFromUrlSafeValueString(tmp);
    assertEquals(null, input1.getValue());
  }
{code}

This test case did the similar thing as described. It asserts that the retrieved value should be null, as the last assertEquals() shows. So I was wondering whether this is supposed to be working in this way.

                
> Sqoop2: MMapInput is null while retrieving from DB if pass empty map on write
> -----------------------------------------------------------------------------
>
>                 Key: SQOOP-827
>                 URL: https://issues.apache.org/jira/browse/SQOOP-827
>             Project: Sqoop
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 2.0.0
>            Reporter: Vasanth kumar RJ
>            Assignee: Mengwei Ding
>             Fix For: 2.0.0
>
>
> In TestConnectionHandling.testUpdateConnection() method, if I use MMapInput type for forms and set empty Map object to value. Then after update, in retrieved part getting form value as null. Expected a empty map object in retrieved part.
> If I add any item in map object and update then getting expected same map.
> Thanks,
> Vasanth kumar

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira