MCPcopy Create free account
hub / github.com/apache/pig / ShortenField

Method ShortenField

src/org/apache/pig/pen/util/DisplayExamples.java:332–349  ·  view source on GitHub ↗
(Object d)

Source from the content-addressed store, hash-verified

330 }
331
332 static String ShortenField(Object d) throws ExecException {
333 if (d instanceof Tuple)
334 return ShortenField((Tuple) d);
335 else if (d instanceof DataBag)
336 return ShortenField((DataBag) d);
337 else {
338 // System.out.println("Unrecognized data-type received!!!");
339 // return null;
340 if (DataType.findTypeName(d) != null) {
341 if (d == null)
342 return "";
343 else
344 return d.toString();
345 }
346 }
347 System.out.println("Unrecognized data-type received!!!");
348 return null;
349 }
350
351 static String ShortenField(DataBag bag) throws ExecException {
352 StringBuffer str = new StringBuffer();

Callers 1

MakeArrayMethod · 0.95

Calls 8

findTypeNameMethod · 0.95
sizeMethod · 0.65
appendMethod · 0.65
iteratorMethod · 0.65
getMethod · 0.65
toStringMethod · 0.45
nextMethod · 0.45
hasNextMethod · 0.45

Tested by

no test coverage detected