MCPcopy Create free account
hub / github.com/1345414527/MIT6.830 / getSize

Method getSize

src/java/simpledb/storage/TupleDesc.java:185–193  ·  view source on GitHub ↗

获取所有元数据的字节大小 @return The size (in bytes) of tuples corresponding to this TupleDesc. Note that tuples from a given TupleDesc are of a fixed size.

()

Source from the content-addressed store, hash-verified

183 * Note that tuples from a given TupleDesc are of a fixed size.
184 */
185 public int getSize() {
186 // some code goes here
187 int res = 0;
188 for(int i=0;i<this.tupleDescList.size();i++){
189 res += this.tupleDescList.get(i).fieldType.getLen();
190 }
191 return res;
192
193 }
194
195 /**
196 * Merge two TupleDescs into one, with td1.numFields + td2.numFields fields,

Callers 2

combineMethod · 0.95
getSizeMethod · 0.95

Calls 2

getLenMethod · 0.80
getMethod · 0.80

Tested by 2

combineMethod · 0.76
getSizeMethod · 0.76