Home Forums Pig Pig 0.12 in HDP 2.0 and ASSERT

Tagged: , ,

This topic contains 4 replies, has 2 voices, and was last updated by  Snoot 6 months, 1 week ago.

  • Creator
    Topic
  • #46162

    Snoot
    Participant

    Hi,

    I’m trying to use the ASSERT statement (e.g. assert a by a1 > 0 'a cant be negative for reasons';) which is supposed to be supported in Pig 0.12 that ships with HDP 2.0 but I get an error saying:

    [main] ERROR org.apache.pig.tools.grunt.Grunt - ERROR 1000: Error during parsing. Encountered " <IDENTIFIER> "assert "" at line 1, column 1.
    Was expecting one of:

    What went wrong?

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

  • Author
    Replies
  • #49024

    Snoot
    Participant

    Hi,

    I tried Jianyong Dai’s solution on both Pig 0.12.0.2.0.6.1-101 (rexported) compiled Jan 08 2014, 22:49:47 (on HDP 2.0) and 0.12.0 (r1529718) compiled Oct 07 2013, 12:20:14 (Hadoop 0.20) – and it doesn’t work. Any ideas on how to make it work before Pig 0.12.1?

    Collapse
    #48484

    Jianyong Dai
    Participant

    It is now fixed. Will come with Pig 0.12.1.

    Collapse
    #46892

    Jianyong Dai
    Participant

    Opened PIG-3670 for that.

    Collapse
    #46778

    Jianyong Dai
    Participant

    Seems there is a bug in implementation. You can use the following syntax for now:

    b = a by a1 > 0 'a cant be negative for reasons';

    Collapse
Viewing 4 replies - 1 through 4 (of 4 total)