private MTable getMTable(String catName, String db, String table) { AttachedMTableInfo nmtbl = getMTable(catName, db, table, false); return nmtbl.mtbl; }
/** * Gets the table object for a given table, throws if anything goes wrong. * @param dbName Database name. * @param tblName Table name. * @return Table object. */ private MTable ensureGetMTable(String catName, String dbName, String tblName) throws NoSuchObjectException, MetaException { MTable mtable = getMTable(catName, dbName, tblName); if (mtable == null) { throw new NoSuchObjectException("Specified catalog.database.table does not exist : " + TableName.getQualified(catName, dbName, tblName)); } return mtable; }
private MCreationMetadata convertToMCreationMetadata( CreationMetadata m) throws MetaException { if (m == null) { return null; } assert !m.isSetMaterializationTime(); Set<MTable> tablesUsed = new HashSet<>(); for (String fullyQualifiedName : m.getTablesUsed()) { String[] names = fullyQualifiedName.split("\\."); tablesUsed.add(getMTable(m.getCatName(), names[0], names[1], false).mtbl); } return new MCreationMetadata(normalizeIdentifier(m.getCatName()), normalizeIdentifier(m.getDbName()), normalizeIdentifier(m.getTblName()), tablesUsed, m.getValidTxnList(), System.currentTimeMillis()); }
tableName = tableName.toLowerCase(); MTable mtable = getMTable(catName, dbName, tableName); if( mtable == null ) {
Collection parts = getPartitionPsQueryResults(catName, db_name, tbl_name, part_vals, max_parts, null, queryWrapper); MTable mtbl = getMTable(catName, db_name, tbl_name); for (Object o : parts) { Partition part = convertToPart((MPartition) o);
AttachedMTableInfo nParentTable = getMTable(catName, tableDB, tableName, retrieveCD); MTable parentTable = nParentTable.mtbl; if (parentTable == null) {
@Override public ColumnStatistics getTableColumnStatistics( String catName, String dbName, String tableName, List<String> colNames, String writeIdList) throws MetaException, NoSuchObjectException { // If the current stats in the metastore doesn't comply with // the isolation level of the query, set No to the compliance flag. Boolean isCompliant = null; if (writeIdList != null) { MTable table = this.getMTable(catName, dbName, tableName); isCompliant = !TxnUtils.isTransactionalTable(table.getParameters()) || (areTxnStatsSupported && isCurrentStatsValidForTheQuery(table, writeIdList, false)); } ColumnStatistics stats = getTableColumnStatisticsInternal( catName, dbName, tableName, colNames, true, true); if (stats != null && isCompliant != null) { stats.setIsStatsCompliant(isCompliant); } return stats; }
AttachedMTableInfo nParentTable = getMTable(catName, tableDB, tableName, retrieveCD); MTable parentTable = nParentTable.mtbl; if (parentTable == null) {
AttachedMTableInfo nParentTable = getMTable(catName, tableDB, tableName, retrieveCD); MTable parentTable = nParentTable.mtbl; if (parentTable == null) {
List<MTablePrivilege> tabGrants = null; List<MTableColumnPrivilege> tabColumnGrants = null; MTable table = this.getMTable(catName, dbName, tblName); if ("TRUE".equalsIgnoreCase(table.getParameters().get("PARTITION_LEVEL_PRIVILEGE"))) { tabGrants = this.listAllTableGrants(catName, dbName, tblName);
AttachedMTableInfo nParentTable = getMTable(catName, tableDB, tableName, retrieveCD); MTable parentTable = nParentTable.mtbl; if (parentTable == null) {
try { openTransaction(); MTable tbl = getMTable(catName, dbName, tableName); pm.retrieve(tbl); if (tbl != null) {
try { openTransaction(); MTable table = this.getMTable(catName, dbName, tableName); MPartition mpart = getMPartition(catName, dbName, tableName, part_vals); part = convertToPart(mpart);
try { openTransaction(); MTable mtable = getMTable(catName, dbName, tableName); tbl = convertToTable(mtable);
openTransaction(); String catName = part.isSetCatName() ? part.getCatName() : getDefaultCatalog(conf); MTable table = this.getMTable(catName, part.getDbName(), part.getTableName()); List<MTablePrivilege> tabGrants = null; List<MTableColumnPrivilege> tabColumnGrants = null;
try { openTransaction(); MTable mtbl = getMTable(catName, dbName, tableName); if (mtbl == null) { return null;
MTable oldt = getMTable(catName, dbname, name); Map<String, String> newParams = new HashMap<>(table.getParameters()); StatsSetupConst.setColumnStatsState(newParams, colNames);
List<MTablePrivilege> tabGrants = null; List<MTableColumnPrivilege> tabColumnGrants = null; MTable table = this.getMTable(catName, dbName, tblName); if ("TRUE".equalsIgnoreCase(table.getParameters().get("PARTITION_LEVEL_PRIVILEGE"))) { tabGrants = this.listAllTableGrants(catName, dbName, tblName);
MTable mTable = getMTable(catName, dbName, tableName); MTableColumnStatistics mStatsObj; List<MTableColumnStatistics> mStatsObjColl;
name = normalizeIdentifier(name); dbname = normalizeIdentifier(dbname); MTable table = this.getMTable(newPart.getCatName(), newPart.getDbName(), newPart.getTableName()); MPartition oldp = getMPartition(catName, dbname, name, part_vals); MPartition newp = convertToMPart(newPart, table, false);