public class DDLPlanUtils extends Object
| Constructor and Description |
|---|
DDLPlanUtils() |
public List<String> getCreateDatabaseStmt(Set<String> dbNames)
dbNames - public boolean checkIfDefaultPartition(String pt)
public String getAlterTableAddPartition(Partition pt) throws org.apache.hadoop.hive.metastore.api.MetaException
pt - org.apache.hadoop.hive.metastore.api.MetaExceptionpublic void addLongStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public void addBooleanStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public void addStringStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public void addDateStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public void addBinaryStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public byte[] setByteArrayToLongSize(byte[] arr)
public void addDecimalStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public void addDoubleStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd, List<String> ls)
public String checkBitVectors(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData cd)
public String addAllColStats(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData columnStatisticsData)
public String getAlterTableStmtCol(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData columnStatisticsData, String colName, String tblName, String dbName)
columnStatisticsData - colName - tblName - dbName - public List<String> getAlterTableStmtTableStatsColsAll(Table tbl) throws HiveException
tbl - HiveExceptionpublic String getAlterTableStmtPartitionColStat(org.apache.hadoop.hive.metastore.api.ColumnStatisticsData columnStatisticsData, String colName, String tblName, String ptName, String dbName)
columnStatisticsData - colName - tblName - ptName - dbName - public List<String> getAlterTableStmtPartitionStatsColsAll(List<org.apache.hadoop.hive.metastore.api.ColumnStatisticsObj> columnStatisticsObjList, String tblName, String ptName, String dbName)
columnStatisticsObjList - tblName - ptName - dbName - public String getAlterTableStmtPartitionStatsBasic(Partition pt)
pt - public List<String> getDDLPlanForPartitionWithStats(Table table, Map<String,List<Partition>> tableToPartitionList) throws org.apache.hadoop.hive.metastore.api.MetaException, HiveException
public String getAlterTableStmtTableStatsBasic(Table tbl)
tbl - public String getAlterTableStmtPrimaryKeyConstraint(PrimaryKeyInfo pr)
public void getAlterTableStmtForeignKeyConstraint(ForeignKeyInfo fr, List<String> constraints, Set<String> allTableNames)
public void getAlterTableStmtUniqueConstraint(UniqueConstraint uq, List<String> constraints)
public void getAlterTableStmtDefaultConstraint(DefaultConstraint dc, Table tb, List<String> constraints)
public void getAlterTableStmtCheckConstraint(CheckConstraint ck, List<String> constraints)
public void getAlterTableStmtNotNullConstraint(NotNullConstraint nc, Table tb, List<String> constraints)
public List<String> populateConstraints(Table tb, Set<String> allTableNames)
tb - public String getCreateViewStmt(Table table)
table - public static String formatType(TypeInfo typeInfo)
public static void appendSerdeParams(StringBuilder builder, Map<String,String> serdeParams)
Copyright © 2022 The Apache Software Foundation. All rights reserved.