You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Xuefu Zhang (JIRA)" <ji...@apache.org> on 2011/05/12 18:29:47 UTC
[jira] [Created] (PIG-2063) Regression: an invalid query regarding
union onschema becoming valid
Regression: an invalid query regarding union onschema becoming valid
--------------------------------------------------------------------
Key: PIG-2063
URL: https://issues.apache.org/jira/browse/PIG-2063
Project: Pig
Issue Type: Bug
Affects Versions: 0.9.0
Reporter: Xuefu Zhang
Assignee: Thejas M Nair
Fix For: 0.9.0
The following query fails in 0.8:
A = load 'x' as (x:long, y:chararray);
B = load 'y' as (x:long, y:float);
C = union onschema A, B;
grunt> C = union onschema A, B;
2011-05-12 09:01:47,031 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1031: Incompatible types for merging schemas. Field schema: y: chararray Other field schema: y: float
However, in 0.9 validation doesn't catch the error. It seems float is cast to chararray automatically.
grunt> describe C;
C: {x: long,y: chararray}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (PIG-2063) Regression: an invalid query regarding
union onschema becoming valid
Posted by "Thejas M Nair (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2063?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thejas M Nair resolved PIG-2063.
--------------------------------
Resolution: Invalid
The behavior of union-onschema has changed as a result of PIG-1536. I have created PIG-2068 to update the documentation.
> Regression: an invalid query regarding union onschema becoming valid
> --------------------------------------------------------------------
>
> Key: PIG-2063
> URL: https://issues.apache.org/jira/browse/PIG-2063
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.9.0
> Reporter: Xuefu Zhang
> Assignee: Thejas M Nair
> Fix For: 0.9.0
>
>
> The following query fails in 0.8:
> A = load 'x' as (x:long, y:chararray);
> B = load 'y' as (x:long, y:float);
> C = union onschema A, B;
> grunt> C = union onschema A, B;
> 2011-05-12 09:01:47,031 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1031: Incompatible types for merging schemas. Field schema: y: chararray Other field schema: y: float
> However, in 0.9 validation doesn't catch the error. It seems float is cast to chararray automatically.
> grunt> describe C;
> C: {x: long,y: chararray}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (PIG-2063) Regression: an invalid query
regarding union onschema becoming valid
Posted by "Xuefu Zhang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-2063?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032522#comment-13032522 ]
Xuefu Zhang commented on PIG-2063:
----------------------------------
The same problem occurs for cases where a column is a bag or tuple with different columns. Refer to TestUnionOnSchema.testUnionOnSchemaIncompatibleTypes() for examples.
> Regression: an invalid query regarding union onschema becoming valid
> --------------------------------------------------------------------
>
> Key: PIG-2063
> URL: https://issues.apache.org/jira/browse/PIG-2063
> Project: Pig
> Issue Type: Bug
> Affects Versions: 0.9.0
> Reporter: Xuefu Zhang
> Assignee: Thejas M Nair
> Fix For: 0.9.0
>
>
> The following query fails in 0.8:
> A = load 'x' as (x:long, y:chararray);
> B = load 'y' as (x:long, y:float);
> C = union onschema A, B;
> grunt> C = union onschema A, B;
> 2011-05-12 09:01:47,031 [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1031: Incompatible types for merging schemas. Field schema: y: chararray Other field schema: y: float
> However, in 0.9 validation doesn't catch the error. It seems float is cast to chararray automatically.
> grunt> describe C;
> C: {x: long,y: chararray}
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira