Class PigTable

java.lang.Object
org.apache.calcite.schema.impl.AbstractTable
org.apache.calcite.adapter.pig.PigTable
All Implemented Interfaces:
Table, TranslatableTable, Wrapper

public class PigTable extends AbstractTable implements TranslatableTable
Represents a Pig relation that is created by Pig Latin LOAD statement.

Only the default load function is supported at this point (PigStorage()).

Only VARCHAR (CHARARRAY in Pig) type supported at this point.

See Also:
  • Constructor Details

    • PigTable

      public PigTable(String filePath, String[] fieldNames)
      Creates a PigTable.
  • Method Details

    • getRowType

      public RelDataType getRowType(RelDataTypeFactory typeFactory)
      Description copied from interface: Table
      Returns this table's row type.

      This is a struct type whose fields describe the names and types of the columns in this table.

      The implementer must use the type factory provided. This ensures that the type is converted into a canonical form; other equal types in the same query will use the same object.

      Specified by:
      getRowType in interface Table
      Parameters:
      typeFactory - Type factory with which to create the type
      Returns:
      Row type
    • getFilePath

      public String getFilePath()
    • toRel

      public RelNode toRel(RelOptTable.ToRelContext context, RelOptTable relOptTable)
      Description copied from interface: TranslatableTable
      Converts this table into a relational expression.
      Specified by:
      toRel in interface TranslatableTable