Class PigTypes


  • class PigTypes
    extends java.lang.Object
    Utility methods for converting Pig data types to SQL types.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      (package private) static class  PigTypes.PigRelDataTypeFactory
      Type factory that produces types with the nullability when converting from Pig types.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private PigTypes()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static RelDataType convertSchema​(org.apache.pig.newplan.logical.relational.LogicalSchema pigSchema)
      Converts a Pig tuple schema to a SQL row type.
      (package private) static RelDataType convertSchema​(org.apache.pig.newplan.logical.relational.LogicalSchema pigSchema, boolean nullable)
      Converts a Pig tuple schema to a SQL row type.
      (package private) static RelDataType convertSchemaField​(org.apache.pig.newplan.logical.relational.LogicalSchema.LogicalFieldSchema pigField)
      Converts a Pig schema field to relational type.
      (package private) static RelDataType convertSchemaField​(org.apache.pig.newplan.logical.relational.LogicalSchema.LogicalFieldSchema pigField, boolean nullable)
      Converts a Pig schema field to relational type.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PigTypes

        private PigTypes()
    • Method Detail

      • convertSchemaField

        static RelDataType convertSchemaField​(org.apache.pig.newplan.logical.relational.LogicalSchema.LogicalFieldSchema pigField)
        Converts a Pig schema field to relational type.
        Parameters:
        pigField - Pig schema field
        Returns:
        Relational type
      • convertSchemaField

        static RelDataType convertSchemaField​(org.apache.pig.newplan.logical.relational.LogicalSchema.LogicalFieldSchema pigField,
                                              boolean nullable)
        Converts a Pig schema field to relational type.
        Parameters:
        pigField - Pig schema field
        nullable - true if the type is nullable
        Returns:
        Relational type
      • convertSchema

        static RelDataType convertSchema​(org.apache.pig.newplan.logical.relational.LogicalSchema pigSchema)
        Converts a Pig tuple schema to a SQL row type.
        Parameters:
        pigSchema - Pig tuple schema
        Returns:
        a SQL row type
      • convertSchema

        static RelDataType convertSchema​(org.apache.pig.newplan.logical.relational.LogicalSchema pigSchema,
                                         boolean nullable)
        Converts a Pig tuple schema to a SQL row type.
        Parameters:
        pigSchema - Pig tuple schema
        nullable - true if the type is nullable
        Returns:
        a SQL row type