Grokbase Groups Pig dev April 2011
FAQ
deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
--------------------------------------------------------------------------------------

Key: PIG-1967
URL: https://issues.apache.org/jira/browse/PIG-1967
Project: Pig
Issue Type: Improvement
Affects Versions: 0.8.0, 0.9.0
Reporter: Thejas M Nair
Fix For: 0.9.0


When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
See -
https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449

The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.

I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Search Discussions

  • Olga Natkovich (JIRA) at Apr 6, 2011 at 9:38 pm
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-1967:
    --------------------------------

    Fix Version/s: (was: 0.9.0)
    0.10

    Delaying till 10 since we do not have an alternative in 0.9
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Fix For: 0.10


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Olga Natkovich (Updated) (JIRA) at Oct 5, 2011 at 12:09 am
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Olga Natkovich updated PIG-1967:
    --------------------------------

    Fix Version/s: (was: 0.10)
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair

    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Thejas M Nair (Updated) (JIRA) at Oct 19, 2011 at 6:10 am
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-1967:
    -------------------------------

    Fix Version/s: 0.10
    Assignee: Thejas M Nair
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.10


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Thejas M Nair (Updated) (JIRA) at Oct 19, 2011 at 6:12 am
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Thejas M Nair updated PIG-1967:
    -------------------------------

    Attachment: PIG-1967.0.patch

    Initial patch, tests need to be updated.
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.10

    Attachments: PIG-1967.0.patch


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Thejas M Nair (Commented) (JIRA) at Oct 20, 2011 at 11:44 pm
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13132213#comment-13132213 ]

    Thejas M Nair commented on PIG-1967:
    ------------------------------------

    The syntax in the initial patch is confusing , it supports (tuple)A.$0 (where A is a relation. But that seems to imply the casting of first column of A as tuple. So the supported syntax should only be - ((tuple)A).$0 .

    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.10

    Attachments: PIG-1967.0.patch


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Daniel Dai (Updated) (JIRA) at Mar 14, 2012 at 11:27 pm
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Daniel Dai updated PIG-1967:
    ----------------------------

    Fix Version/s: (was: 0.10)
    0.11
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.11

    Attachments: PIG-1967.0.patch


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Dmitriy V. Ryaboy (JIRA) at Jun 15, 2012 at 9:24 pm
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295932#comment-13295932 ]

    Dmitriy V. Ryaboy commented on PIG-1967:
    ----------------------------------------

    Can I suggest a different syntax that would make it extra clear to the user that he is doing something unusual, such as

    {code}
    ratios = foreach (group mytable by dimension)
    generate group as dimension,
    COUNT(mytable) / (scalar long) totals.num_rows;
    {code}
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.11

    Attachments: PIG-1967.0.patch


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Thejas M Nair (JIRA) at Jun 15, 2012 at 9:34 pm
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13295937#comment-13295937 ]

    Thejas M Nair commented on PIG-1967:
    ------------------------------------

    I am for making that more clear. But "scalar long" sounds like a new type of long. Also, based on the current precedence of operators, i think it would be read as {code}(scalar long) (totals.num_rows){code}
    How about using - {code}((scalar)totals).num_rows{code} or {code} ((scalar tuple)totals).num_rows{code} .

    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.11

    Attachments: PIG-1967.0.patch


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
    For more information on JIRA, see: http://www.atlassian.com/software/jira
  • Julien Le Dem (JIRA) at Nov 19, 2012 at 7:35 pm
    [ https://issues.apache.org/jira/browse/PIG-1967?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Julien Le Dem updated PIG-1967:
    -------------------------------

    Fix Version/s: (was: 0.11)
    0.12

    This will go in a future release
    deprecate current syntax for casting relation as scalar, to use explicit cast to tuple
    --------------------------------------------------------------------------------------

    Key: PIG-1967
    URL: https://issues.apache.org/jira/browse/PIG-1967
    Project: Pig
    Issue Type: Improvement
    Affects Versions: 0.8.0, 0.9.0
    Reporter: Thejas M Nair
    Assignee: Thejas M Nair
    Fix For: 0.12

    Attachments: PIG-1967.0.patch


    When the feature added in PIG-1434, there was a proposal to cast it to tuple, to be able to use as a scalar. But for some reason, in the implementation this cast was not required.
    See -
    https://issues.apache.org/jira/browse/PIG-1434?focusedCommentId=12888449&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-12888449
    The current syntax which does not need this cast seems to lead to lot of confusion among users, who end up using this feature unintentionally. This usually happens because the user is referring to the bag column(s) in output of (co)group using a wrong name, which happens to be another relation. Often, users realize the mistake only at runtime. New users, will have trouble figuring out what was wrong.
    I think we should support the use of the cast as originally proposed, and deprecate the current syntax. The warning issued when the deprecated syntax is used is likely to help users realize that they have unintentionally used this feature.
    --
    This message is automatically generated by JIRA.
    If you think it was sent incorrectly, please contact your JIRA administrators
    For more information on JIRA, see: http://www.atlassian.com/software/jira

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriespig, hadoop
postedApr 6, '11 at 7:42p
activeNov 19, '12 at 7:35p
posts10
users1
websitepig.apache.org

1 user in discussion

Julien Le Dem (JIRA): 10 posts

People

Translate

site design / logo © 2022 Grokbase