@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_tblName = true && (isSetTblName()); list.add(present_tblName); if (present_tblName) list.add(tblName); boolean present_colNames = true && (isSetColNames()); list.add(present_colNames); if (present_colNames) list.add(colNames); boolean present_catName = true && (isSetCatName()); list.add(present_catName); if (present_catName) list.add(catName); boolean present_validWriteIdList = true && (isSetValidWriteIdList()); list.add(present_validWriteIdList); if (present_validWriteIdList) list.add(validWriteIdList); return list.hashCode(); }
if (isSetCatName()) { if (!first) sb.append(", "); sb.append("catName:");
if (struct.isSetCatName()) { oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); oprot.writeString(struct.catName);
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDbName(); case TBL_NAME: return isSetTblName(); case COL_NAMES: return isSetColNames(); case CAT_NAME: return isSetCatName(); case VALID_WRITE_ID_LIST: return isSetValidWriteIdList(); } throw new IllegalStateException(); }
lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); if (lastComparison != 0) { return lastComparison; if (isSetCatName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); if (lastComparison != 0) {
/** * Performs a deep copy on <i>other</i>. */ public TableStatsRequest(TableStatsRequest other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetTblName()) { this.tblName = other.tblName; } if (other.isSetColNames()) { List<String> __this__colNames = new ArrayList<String>(other.colNames); this.colNames = __this__colNames; } if (other.isSetCatName()) { this.catName = other.catName; } if (other.isSetValidWriteIdList()) { this.validWriteIdList = other.validWriteIdList; } }
boolean this_present_catName = true && this.isSetCatName(); boolean that_present_catName = true && that.isSetCatName(); if (this_present_catName || that_present_catName) { if (!(this_present_catName && that_present_catName))
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.dbName); oprot.writeString(struct.tblName); { oprot.writeI32(struct.colNames.size()); for (String _iter462 : struct.colNames) { oprot.writeString(_iter462); } } BitSet optionals = new BitSet(); if (struct.isSetCatName()) { optionals.set(0); } if (struct.isSetValidWriteIdList()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetCatName()) { oprot.writeString(struct.catName); } if (struct.isSetValidWriteIdList()) { oprot.writeString(struct.validWriteIdList); } }
@Override public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws TException { String catName = request.isSetCatName() ? request.getCatName().toLowerCase() : getDefaultCatalog(conf); String dbName = request.getDbName().toLowerCase(); String tblName = request.getTblName().toLowerCase(); startFunction("get_table_statistics_req", ": table=" + TableName.getQualified(catName, dbName, tblName)); TableStatsResult result = null; List<String> lowerCaseColNames = new ArrayList<>(request.getColNames().size()); for (String colName : request.getColNames()) { lowerCaseColNames.add(colName.toLowerCase()); } try { ColumnStatistics cs = getMS().getTableColumnStatistics( catName, dbName, tblName, lowerCaseColNames, request.getValidWriteIdList()); // Note: stats compliance is not propagated to the client; instead, we just return nothing // if stats are not compliant for now. This won't work for stats merging, but that // is currently only done on metastore size (see set_aggr...). // For some optimizations we might make use of incorrect stats that are "better than // nothing", so this may change in future. result = new TableStatsResult((cs == null || cs.getStatsObj() == null || (cs.isSetIsStatsCompliant() && !cs.isIsStatsCompliant())) ? Lists.newArrayList() : cs.getStatsObj()); } finally { endFunction("get_table_statistics_req", result == null, null, tblName); } return result; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_dbName = true && (isSetDbName()); list.add(present_dbName); if (present_dbName) list.add(dbName); boolean present_tblName = true && (isSetTblName()); list.add(present_tblName); if (present_tblName) list.add(tblName); boolean present_colNames = true && (isSetColNames()); list.add(present_colNames); if (present_colNames) list.add(colNames); boolean present_catName = true && (isSetCatName()); list.add(present_catName); if (present_catName) list.add(catName); return list.hashCode(); }
if (isSetCatName()) { if (!first) sb.append(", "); sb.append("catName:");
if (struct.isSetCatName()) { oprot.writeFieldBegin(CAT_NAME_FIELD_DESC); oprot.writeString(struct.catName);
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case DB_NAME: return isSetDbName(); case TBL_NAME: return isSetTblName(); case COL_NAMES: return isSetColNames(); case CAT_NAME: return isSetCatName(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public TableStatsRequest(TableStatsRequest other) { if (other.isSetDbName()) { this.dbName = other.dbName; } if (other.isSetTblName()) { this.tblName = other.tblName; } if (other.isSetColNames()) { List<String> __this__colNames = new ArrayList<String>(other.colNames); this.colNames = __this__colNames; } if (other.isSetCatName()) { this.catName = other.catName; } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsRequest struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.dbName); oprot.writeString(struct.tblName); { oprot.writeI32(struct.colNames.size()); for (String _iter454 : struct.colNames) { oprot.writeString(_iter454); } } BitSet optionals = new BitSet(); if (struct.isSetCatName()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetCatName()) { oprot.writeString(struct.catName); } }
lastComparison = Boolean.valueOf(isSetCatName()).compareTo(other.isSetCatName()); if (lastComparison != 0) { return lastComparison; if (isSetCatName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.catName, other.catName); if (lastComparison != 0) {
boolean this_present_catName = true && this.isSetCatName(); boolean that_present_catName = true && that.isSetCatName(); if (this_present_catName || that_present_catName) { if (!(this_present_catName && that_present_catName))
@Override public TableStatsResult get_table_statistics_req(TableStatsRequest request) throws TException { String catName = request.isSetCatName() ? request.getCatName().toLowerCase() : getDefaultCatalog(conf); String dbName = request.getDbName().toLowerCase(); String tblName = request.getTblName().toLowerCase(); startFunction("get_table_statistics_req", ": table=" + getCatalogQualifiedTableName(catName, dbName, tblName)); TableStatsResult result = null; List<String> lowerCaseColNames = new ArrayList<>(request.getColNames().size()); for (String colName : request.getColNames()) { lowerCaseColNames.add(colName.toLowerCase()); } try { ColumnStatistics cs = getMS().getTableColumnStatistics(catName, dbName, tblName, lowerCaseColNames); result = new TableStatsResult((cs == null || cs.getStatsObj() == null) ? Lists.newArrayList() : cs.getStatsObj()); } finally { endFunction("get_table_statistics_req", result == null, null, tblName); } return result; }