You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pig.apache.org by "Pradeep Kamath (JIRA)" <ji...@apache.org> on 2008/07/15 02:29:31 UTC
[jira] Created: (PIG-315) Issue with cast in foreach
Issue with cast in foreach
--------------------------
Key: PIG-315
URL: https://issues.apache.org/jira/browse/PIG-315
Project: Pig
Issue Type: Bug
Affects Versions: types_branch
Reporter: Pradeep Kamath
Fix For: types_branch
Query which causes error:
{code}
a = load ':INPATH:/singlefile/studenttab10k' as (name:chararray, age:int, gpa:double);
b = foreach a generate (long)age as age, (int)gpa as gpa;
c = foreach b generate SUM(age), SUM(gpa);
store c into ':OUTPATH:';\,
{code}
Error:
{quote}
2008-07-14 16:34:42,130 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: mytesthost:8020
2008-07-14 16:34:42,187 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
2008-07-14 16:34:42,441 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: mytesthost:50020
2008-07-14 16:34:42,696 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Problem resolving LOForEach schema
2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Severe problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop
2008-07-14 16:34:43,007 [main] ERROR org.apache.pig.tools.grunt.Grunt - java.io.IOException: Unable to store for alias: c
{quote}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-315) Issue with cast in foreach
Posted by "Pi Song (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pi Song updated PIG-315:
------------------------
Resolution: Fixed
Status: Resolved (was: Patch Available)
Committed
> Issue with cast in foreach
> --------------------------
>
> Key: PIG-315
> URL: https://issues.apache.org/jira/browse/PIG-315
> Project: Pig
> Issue Type: Bug
> Affects Versions: types_branch
> Reporter: Pradeep Kamath
> Fix For: types_branch
>
> Attachments: PIG315.patch
>
>
> Query which causes error:
> {code}
> a = load ':INPATH:/singlefile/studenttab10k' as (name:chararray, age:int, gpa:double);
> b = foreach a generate (long)age as age, (int)gpa as gpa;
> c = foreach b generate SUM(age), SUM(gpa);
> store c into ':OUTPATH:';\,
> {code}
> Error:
> {quote}
> 2008-07-14 16:34:42,130 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: mytesthost:8020
> 2008-07-14 16:34:42,187 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
> 2008-07-14 16:34:42,441 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: mytesthost:50020
> 2008-07-14 16:34:42,696 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
> 2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Problem resolving LOForEach schema
> 2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Severe problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop
> 2008-07-14 16:34:43,007 [main] ERROR org.apache.pig.tools.grunt.Grunt - java.io.IOException: Unable to store for alias: c
> {quote}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-315) Issue with cast in foreach
Posted by "Pi Song (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pi Song updated PIG-315:
------------------------
Status: Patch Available (was: Open)
> Issue with cast in foreach
> --------------------------
>
> Key: PIG-315
> URL: https://issues.apache.org/jira/browse/PIG-315
> Project: Pig
> Issue Type: Bug
> Affects Versions: types_branch
> Reporter: Pradeep Kamath
> Fix For: types_branch
>
> Attachments: PIG315.patch
>
>
> Query which causes error:
> {code}
> a = load ':INPATH:/singlefile/studenttab10k' as (name:chararray, age:int, gpa:double);
> b = foreach a generate (long)age as age, (int)gpa as gpa;
> c = foreach b generate SUM(age), SUM(gpa);
> store c into ':OUTPATH:';\,
> {code}
> Error:
> {quote}
> 2008-07-14 16:34:42,130 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: mytesthost:8020
> 2008-07-14 16:34:42,187 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
> 2008-07-14 16:34:42,441 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: mytesthost:50020
> 2008-07-14 16:34:42,696 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
> 2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Problem resolving LOForEach schema
> 2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Severe problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop
> 2008-07-14 16:34:43,007 [main] ERROR org.apache.pig.tools.grunt.Grunt - java.io.IOException: Unable to store for alias: c
> {quote}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (PIG-315) Issue with cast in foreach
Posted by "Pi Song (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/PIG-315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Pi Song updated PIG-315:
------------------------
Attachment: PIG315.patch
The patch!
1) In "(long)age as age" we treat "as" as type cast but in fact it is only used for altering the alias in this context
2) "SUM(age)" is aggregate of a flattened member which is a case we haven't handled yet in type checker (Normally we do like SUM(A.age) ).
I think how we treat aggregates still can be improved to be cleaner.
> Issue with cast in foreach
> --------------------------
>
> Key: PIG-315
> URL: https://issues.apache.org/jira/browse/PIG-315
> Project: Pig
> Issue Type: Bug
> Affects Versions: types_branch
> Reporter: Pradeep Kamath
> Fix For: types_branch
>
> Attachments: PIG315.patch
>
>
> Query which causes error:
> {code}
> a = load ':INPATH:/singlefile/studenttab10k' as (name:chararray, age:int, gpa:double);
> b = foreach a generate (long)age as age, (int)gpa as gpa;
> c = foreach b generate SUM(age), SUM(gpa);
> store c into ':OUTPATH:';\,
> {code}
> Error:
> {quote}
> 2008-07-14 16:34:42,130 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to hadoop file system at: mytesthost:8020
> 2008-07-14 16:34:42,187 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
> 2008-07-14 16:34:42,441 [main] INFO org.apache.pig.backend.hadoop.executionengine.HExecutionEngine - Connecting to map-reduce job tracker at: mytesthost:50020
> 2008-07-14 16:34:42,696 [main] WARN org.apache.hadoop.fs.FileSystem - "mytesthost:8020" is a deprecated filesystem name. Use "hdfs://mytesthost:8020/" instead.
> 2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Problem resolving LOForEach schema
> 2008-07-14 16:34:43,006 [main] ERROR org.apache.pig.PigServer - Severe problem found during validation org.apache.pig.impl.plan.PlanValidationException: An unexpected exception caused the validation to stop
> 2008-07-14 16:34:43,007 [main] ERROR org.apache.pig.tools.grunt.Grunt - java.io.IOException: Unable to store for alias: c
> {quote}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.