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

[email protected] commented on HCATALOG-382:
--------------------------------------------------------



bq.  On 2012-04-25 01:23:18, Vandana Ayyalasomayajula wrote:
bq.  > 
http://svn.apache.org/repos/asf/incubator/hcatalog/branches/branch-0.4/src/test/org/apache/hcatalog/pig/TestHCatStorer.java,
 line 450
bq.  > <https://reviews.apache.org/r/4861/diff/1/?file=104130#file104130line450>
bq.  >
bq.  >     instead of having another column added ( the 'g' column'), can we 
have the input[2] have the f column null, so that it tests your case. 
bq.  >     
bq.  >     Like:
bq.  >     input[i++]= i + "\t" + i * 2.1f +"\t"+ i*1.1d + "\t" + i * 2L 
+"\t"+"lets hcat";
bq.  
bq.  Rohini Palaniswamy wrote:
bq.      If you see 
bq.      input[i++]= "0\t\t\t\t\t\t"; //Empty values except first column 
bq.         already has empty value for the binary field f. The problem is pig 
stores a empty byte array when there is a empty value for a bytearray column 
but null for all other data types. Only way to store null in a bytearray column 
using pig was to not make it not part of the pig schema. So had to add another 
column g which was part of hcat schema but not part of pig load schema.

okay. Makes sense. Can you add a comment mentioning the above reasoning, so 
that if someone is looking at the test case it will be clear to them.


- Vandana


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/4861/#review7201
-----------------------------------------------------------


On 2012-04-24 22:07:18, Rohini Palaniswamy wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/4861/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2012-04-24 22:07:18)
bq.  
bq.  
bq.  Review request for hcatalog.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Fixed the NPE
bq.  
bq.  
bq.  This addresses bug HCATALOG-382.
bq.      https://issues.apache.org/jira/browse/HCATALOG-382
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
http://svn.apache.org/repos/asf/incubator/hcatalog/branches/branch-0.4/src/java/org/apache/hcatalog/pig/PigHCatUtil.java
 1329472 
bq.    
http://svn.apache.org/repos/asf/incubator/hcatalog/branches/branch-0.4/src/test/org/apache/hcatalog/pig/TestHCatStorer.java
 1329472 
bq.  
bq.  Diff: https://reviews.apache.org/r/4861/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Unit test added.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Rohini
bq.  
bq.


                
> NPE in pig when a binary field is null
> --------------------------------------
>
>                 Key: HCATALOG-382
>                 URL: https://issues.apache.org/jira/browse/HCATALOG-382
>             Project: HCatalog
>          Issue Type: Bug
>          Components: pig
>    Affects Versions: 0.4
>            Reporter: Rohini Palaniswamy
>            Assignee: Rohini Palaniswamy
>         Attachments: HCATALOG-382-1.patch, HCATALOG-382.patch, 
> HCATALOG-382.patch
>
>
> When HCAT has a binary column and if the SerDe returns null for that column, 
> there is a NPE in PigHCatUtil

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to