Apache Pig MAX FunctionThe Apache Pig MAX function is used to find out the maximum of the numeric values or chararrays in a single-column bag. It requires a preceding GROUP ALL statement for global maximums and a GROUP BY statement for group maximums. However, it ignores the NULL values. exp - It is an expression with data types like chararray, int, float, long, etc. Example of MAX Function In this example, we will find out the maximum of the given values. Steps to execute MAX FunctionHere, we got the desired output.