ProjectOperator(Operator op, ArrayList<SelectExpressionItem> p, Table table, boolean allColumns) {

    this.op = op;
    this.tuple = new Object[p.size()];
    this.toProject = p;
    this.table = table;
    this.schema = Utility.tables.get(table.getAlias());
    this.allColumns = allColumns;
  }
  /* (non-Javadoc)
   * @see edu.buffalo.cse562.Operator#readOneTuple()
   */
  public ScanOperatorPlain(Table table) {

    this.tableName = table.getName();
    this.tableAlias = table.getAlias();

    HashMap<String, ColumnDetail> intSchema = Main.tableMapping.get(this.tableName.toLowerCase());
    this.indexMaps = Main.indexTypeMaps.get(this.tableName.toLowerCase());
    if (intSchema == null) {
      intSchema = Main.tableMapping.get(this.tableName.toUpperCase());
      this.indexMaps = Main.indexTypeMaps.get(this.tableName.toUpperCase());
    }
    this.operatorTableSchema = this.initialiseOperatorTableSchema(intSchema);

    this.dataFile =
        FileSystems.getDefault()
            .getPath(ConfigManager.getDataDir(), tableName.toLowerCase() + ".dat");

    reset();
  }