All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.odps.sqa.commandapi.ShowCreateTableCommand Maven / Gradle / Ivy

The newest version!
package com.aliyun.odps.sqa.commandapi;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;

import com.aliyun.odps.Odps;
import com.aliyun.odps.OdpsException;
import com.aliyun.odps.type.TypeInfo;
import com.aliyun.odps.type.TypeInfoFactory;

class ShowCreateTableCommand extends SQLTaskCommand {

  private static final Map showCreateTableMap = new LinkedHashMap<>();

  static {
    showCreateTableMap.put("Info", TypeInfoFactory.STRING);
  }

  @Override
  public List getResultHeaders() {
    return new ArrayList<>(showCreateTableMap.keySet());
  }

  @Override
  public List getResultTypes() {
    return new ArrayList<>(showCreateTableMap.values());
  }

  @Override
  public RecordIter run(Odps odps, CommandInfo commandInfo) throws OdpsException {
    String taskNamePrefix = "show_create_table_";
    return sqlTaskRun(odps, commandInfo, taskNamePrefix);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy