[
https://issues.apache.org/jira/browse/PIG-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15684919#comment-15684919
]
Koji Noguchi commented on PIG-5067:
-----------------------------------
While looking at the current testcase, saw
{code:title=TestUnionOnSchema.testUnionOnSchemaIncompatibleTypes}
query =
" l1 = load '" + INP_FILE_2NUMS + "' as (x : long, y :
chararray);"
+ "l2 = load '" + INP_FILE_2NUMS + "' as (x : map[ ], y :
chararray);"
+ "u = union onschema l1, l2;"
;
checkSchemaEquals(query, "x : bytearray, y : chararray");
{code}
"Union" itself fails while trying to typecast to bytearray but Union-onschema
currently passes by skipping bytearray typecast...
Shall we fail this use-case as well? Not sure how many users depend on these
incompatible type union.
> Revisit union on numeric type and chararray to bytearray
> --------------------------------------------------------
>
> Key: PIG-5067
> URL: https://issues.apache.org/jira/browse/PIG-5067
> Project: Pig
> Issue Type: Bug
> Reporter: Koji Noguchi
> Assignee: Koji Noguchi
>
> In PIG-2071, we changed the behavior of union on numeric and chararray to
> bytearray.
> This itself was always failing at runtime until we changed to skip the
> bytearray typecast for union-onschema in PIG-3270.
> (For union, it still fails with typecast to bytearray error. )
> Now, seeing users getting inconsistent results due to this union-ed bytearray.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)