[ 
https://issues.apache.org/jira/browse/PIG-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Santhosh Srinivasan updated PIG-303:
------------------------------------

    Attachment: remove_cast_to_bytearray.patch

Casts to bytearray are no longer allowed. The patch includes the following:

1. Parser throws an exception when explicit casts to bytearray are seen

2. Type checker throws an exception when implicit casts to bytearray are used

3. The load interface does not have toBytes(PigType) methods

4. The toBytes method in Utf8StorageConverter.java, BinStorage.java and 
TextLoader.java are retained for future use

5. A text data parser that converts text data to Pig Types

6. Unit test cases for the conversion routines and the casts.

7. Helper methods in DataType.java for checking equal byte arrays and 
converting Pig Map to strings.

TODO:

The byte arrays are parsed as strings as the parser cannot distinguish between 
the two.

Unit tests that still fail are:

    [junit] Running org.apache.pig.test.TestBuiltin
    [junit] Tests run: 23, Failures: 1, Errors: 1, Time elapsed: 14.986 sec
    [junit] Test org.apache.pig.test.TestBuiltin FAILED

    [junit] Running org.apache.pig.test.TestEvalPipeline
    [junit] Tests run: 9, Failures: 0, Errors: 1, Time elapsed: 159.046 sec
    [junit] Test org.apache.pig.test.TestEvalPipeline FAILED

    [junit] Running org.apache.pig.test.TestFilterOpNumeric
    [junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 56.258 sec
    [junit] Test org.apache.pig.test.TestFilterOpNumeric FAILED

    [junit] Running org.apache.pig.test.TestStoreOld
    [junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 41.005 sec
    [junit] Test org.apache.pig.test.TestStoreOld FAILED

> POCast does not cast chararray to bytearray
> -------------------------------------------
>
>                 Key: PIG-303
>                 URL: https://issues.apache.org/jira/browse/PIG-303
>             Project: Pig
>          Issue Type: Bug
>    Affects Versions: types_branch
>            Reporter: Santhosh Srinivasan
>            Assignee: Santhosh Srinivasan
>             Fix For: types_branch
>
>         Attachments: pig_type_to_bytearray.patch, 
> remove_cast_to_bytearray.patch
>
>
> When chararray is cast to bytearray, the query execution fails due to 
> ClassCastException. The problem is inside the getNext(DataByteArray) code in 
> POCast.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to