[
https://issues.apache.org/jira/browse/PIG-303?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Santhosh Srinivasan updated PIG-303:
------------------------------------
Attachment: pig_type_to_bytearray.patch
The patch (pig_type_to_bytearray.patch) includes the following:
1. The load function interface is extended to include toBytes, a method that
will convert Pig Types to the appropriate byte representation that can be used
with the bytesToPigType routine
2. The methods are implemented in all the classes that implement the load
function interface, i.e., PigStorage, BinStorage, TextLoader, private classes
used in the unit test cases, etc.
3. A text data parser that converts text data to Pig Types
4. Unit test cases for the conversion routines and the casts.
5. 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 test cases that still fail are:
[junit] Running org.apache.pig.test.TestEvalPipeline
[junit] Tests run: 8, Failures: 0, Errors: 1, Time elapsed: 179.904 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.124 sec
[junit] Test org.apache.pig.test.TestFilterOpNumeric FAILED
[junit] Running org.apache.pig.test.TestBuiltin
[junit] Tests run: 23, Failures: 1, Errors: 1, Time elapsed: 14.8 sec
[junit] Test org.apache.pig.test.TestBuiltin FAILED
[junit] Running org.apache.pig.test.TestStoreOld
[junit] Tests run: 3, Failures: 0, Errors: 2, Time elapsed: 21.453 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
>
>
> 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.