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

Alan Gates commented on PIG-1896:
---------------------------------

Results of test-patch

     [exec] -1 overall.
     [exec]
     [exec]     +1 @author.  The patch does not contain any @author tags.
     [exec]
     [exec]     +1 tests included.  The patch appears to include 3 new or 
modified tests.
     [exec]
     [exec]     +1 javadoc.  The javadoc tool did not generate any warning 
messages.
     [exec]
     [exec]     +1 javac.  The applied patch does not increase the total number 
of javac compiler warnings.
     [exec]
     [exec]     -1 findbugs.  The patch appears to introduce 1 new Findbugs 
warnings.
     [exec]
     [exec]     -1 release audit.  The applied patch generated 539 release 
audit warnings (more than the trunk's current 537 warnings).
     [exec]
     [exec]
     [exec

The added findbugs warning is:
 Code Warning
   Dm org.apache.pig.impl.util.CastUtils.stringToObject(String, byte) invokes 
inefficient Boolean constructor; use Boolean.valueOf(...) instead
   Bug type DM_BOOLEAN_CTOR (click for details)
   In class org.apache.pig.impl.util.CastUtils
   In method org.apache.pig.impl.util.CastUtils.stringToObject(String, byte)
      At CastUtils.java:[line 168]

You can ignore the additional release audit warnings.  The findbug warning you 
will either need to repair or convince us it shouldn't be repaired and put in a 
directive so it isn't generated.

> CastUtils - Converting Pig DataTypes to Java Data Types
> -------------------------------------------------------
>
>                 Key: PIG-1896
>                 URL: https://issues.apache.org/jira/browse/PIG-1896
>             Project: Pig
>          Issue Type: Improvement
>          Components: impl
>    Affects Versions: 0.8.0
>            Reporter: Jonathan Holloway
>            Assignee: Jonathan Holloway
>            Priority: Minor
>         Attachments: PIG-1896-Test.patch, PIG-1896.patch
>
>
> I ran into an issue with parsing log lines whereby I had to generate a schema 
> in a user defined function.  Part of that involved converting various values 
> into their associated data types, but I couldn't see a way to do it via Pig.  
> Enclosed is a patch to convert org.apache.pig.data.DataType into an 
> associated Java datatype falling back to a String by default - should go into 
> CastUtils.  Any comments/criticism, please let me know.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to