Class PigRelSqlUdfs

java.lang.Object
org.apache.calcite.piglet.PigRelSqlUdfs

public class PigRelSqlUdfs extends Object
User-defined functions (UDFs) needed for Pig-to-RelNode translation.
  • Method Details

    • buildTuple

      public static org.apache.pig.data.Tuple buildTuple(Object... elements)
      Implementation for PIG_TUPLE functions. Builds a Pig Tuple from an array of objects
      Parameters:
      elements - Array of element objects
      Returns:
      Pig Tuple
    • buildBag

      public static org.apache.pig.data.Tuple buildBag(Object... elements)
      Implementation for PIG_BAG functions. Builds a Pig DataBag from the corresponding input
      Parameters:
      elements - Input that contains a bag
      Returns:
      Pig Tuple
    • projectMultiset

      public static List projectMultiset(Object... objects)
      Implementation for BAG_PROJECTION functions. Builds a new multiset by projecting certain columns from another multiset.
      Parameters:
      objects - Input argument, the first one is a multiset, the remaining are indexes of column to project.
      Returns:
      The projected multiset