Grokbase Groups Pig dev August 2008
FAQ
Describe does not produce correct schema for generate with UDF
--------------------------------------------------------------

Key: PIG-363
URL: https://issues.apache.org/jira/browse/PIG-363
Project: Pig
Issue Type: Bug
Affects Versions: types_branch
Reporter: Olga Natkovich
Priority: Critical
Fix For: types_branch


B = foreach A generate string.CONCATSEP(' ', $0, 'foo');
describe B;
{chararray}

UDF has the following outputSchema function:

public Schema outputSchema(Schema input) {
String name = "concatsep_";
if (input.getAliases().size() > 0)
name += input.getAliases().iterator().next() + "_";
return new Schema(new Schema.FieldSchema(name + getNextSchemaId(), DataType.CHARARRAY));
}

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

Search Discussions

  • Olga Natkovich (JIRA) at Aug 7, 2008 at 5:20 pm
    [ https://issues.apache.org/jira/browse/PIG-363?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12620680#action_12620680 ]

    Olga Natkovich commented on PIG-363:
    ------------------------------------

    Alan says this is likely that generate code does not query the schema of UDF. He suggested we look at code in src/org/apache/pig/impl/logicalLayer/validators/TypeCheckingVisitor.java

    Describe does not produce correct schema for generate with UDF
    --------------------------------------------------------------

    Key: PIG-363
    URL: https://issues.apache.org/jira/browse/PIG-363
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Priority: Critical
    Fix For: types_branch


    B = foreach A generate string.CONCATSEP(' ', $0, 'foo');
    describe B;
    {chararray}
    UDF has the following outputSchema function:
    public Schema outputSchema(Schema input) {
    String name = "concatsep_";
    if (input.getAliases().size() > 0)
    name += input.getAliases().iterator().next() + "_";
    return new Schema(new Schema.FieldSchema(name + getNextSchemaId(), DataType.CHARARRAY));
    }
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Olga Natkovich (JIRA) at Aug 7, 2008 at 5:20 pm
    [ https://issues.apache.org/jira/browse/PIG-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich reassigned PIG-363:
    ----------------------------------

    Assignee: Pradeep Kamath
    Describe does not produce correct schema for generate with UDF
    --------------------------------------------------------------

    Key: PIG-363
    URL: https://issues.apache.org/jira/browse/PIG-363
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Pradeep Kamath
    Priority: Critical
    Fix For: types_branch


    B = foreach A generate string.CONCATSEP(' ', $0, 'foo');
    describe B;
    {chararray}
    UDF has the following outputSchema function:
    public Schema outputSchema(Schema input) {
    String name = "concatsep_";
    if (input.getAliases().size() > 0)
    name += input.getAliases().iterator().next() + "_";
    return new Schema(new Schema.FieldSchema(name + getNextSchemaId(), DataType.CHARARRAY));
    }
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pradeep Kamath (JIRA) at Aug 7, 2008 at 9:45 pm
    [ https://issues.apache.org/jira/browse/PIG-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Pradeep Kamath updated PIG-363:
    -------------------------------

    Attachment: desc.patch

    Attached patch to fix this
    Describe does not produce correct schema for generate with UDF
    --------------------------------------------------------------

    Key: PIG-363
    URL: https://issues.apache.org/jira/browse/PIG-363
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Pradeep Kamath
    Priority: Critical
    Fix For: types_branch

    Attachments: desc.patch


    B = foreach A generate string.CONCATSEP(' ', $0, 'foo');
    describe B;
    {chararray}
    UDF has the following outputSchema function:
    public Schema outputSchema(Schema input) {
    String name = "concatsep_";
    if (input.getAliases().size() > 0)
    name += input.getAliases().iterator().next() + "_";
    return new Schema(new Schema.FieldSchema(name + getNextSchemaId(), DataType.CHARARRAY));
    }
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Pradeep Kamath (JIRA) at Aug 7, 2008 at 9:45 pm
    [ https://issues.apache.org/jira/browse/PIG-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Pradeep Kamath updated PIG-363:
    -------------------------------

    Patch Info: [Patch Available]
    Describe does not produce correct schema for generate with UDF
    --------------------------------------------------------------

    Key: PIG-363
    URL: https://issues.apache.org/jira/browse/PIG-363
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Pradeep Kamath
    Priority: Critical
    Fix For: types_branch

    Attachments: desc.patch


    B = foreach A generate string.CONCATSEP(' ', $0, 'foo');
    describe B;
    {chararray}
    UDF has the following outputSchema function:
    public Schema outputSchema(Schema input) {
    String name = "concatsep_";
    if (input.getAliases().size() > 0)
    name += input.getAliases().iterator().next() + "_";
    return new Schema(new Schema.FieldSchema(name + getNextSchemaId(), DataType.CHARARRAY));
    }
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.
  • Olga Natkovich (JIRA) at Aug 7, 2008 at 9:57 pm
    [ https://issues.apache.org/jira/browse/PIG-363?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich resolved PIG-363.
    --------------------------------

    Resolution: Fixed

    patch verified and committed. thanks pradeep
    Describe does not produce correct schema for generate with UDF
    --------------------------------------------------------------

    Key: PIG-363
    URL: https://issues.apache.org/jira/browse/PIG-363
    Project: Pig
    Issue Type: Bug
    Affects Versions: types_branch
    Reporter: Olga Natkovich
    Assignee: Pradeep Kamath
    Priority: Critical
    Fix For: types_branch

    Attachments: desc.patch


    B = foreach A generate string.CONCATSEP(' ', $0, 'foo');
    describe B;
    {chararray}
    UDF has the following outputSchema function:
    public Schema outputSchema(Schema input) {
    String name = "concatsep_";
    if (input.getAliases().size() > 0)
    name += input.getAliases().iterator().next() + "_";
    return new Schema(new Schema.FieldSchema(name + getNextSchemaId(), DataType.CHARARRAY));
    }
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedAug 7, '08 at 12:15a
activeAug 7, '08 at 9:57p
posts6
users1
websitepig.apache.org

1 user in discussion

Olga Natkovich (JIRA): 6 posts

People

Translate

site design / logo © 2022 Grokbase