Skip to content

Instantly share code, notes, and snippets.

@MarkRoddy
Created August 2, 2013 02:37
Show Gist options
  • Save MarkRoddy/6137124 to your computer and use it in GitHub Desktop.
Save MarkRoddy/6137124 to your computer and use it in GitHub Desktop.
Pig will short-circuit Boolean operations when possible. If the first (left) predicate of an and is false,
the second (right) will not be evaluated. So in 1 == 2 and udf(x), the UDF will never be invoked.
Similarly, if the first predicate of an or is true, the second predicate will not be evaluted. 1 == 1 or
udf(x) will never invoke the UDF.
http://chimera.labs.oreilly.com/books/1234000001811/ch05.html#filter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment