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

Method join

src/org/apache/pig/LoadFunc.java:153–162  ·  view source on GitHub ↗

Join multiple strings into a string delimited by the given delimiter. @param s a collection of strings @param delimiter the delimiter @return a 'delimiter' separated string

(AbstractCollection<String> s, String delimiter)

Source from the content-addressed store, hash-verified

151 * @return a 'delimiter' separated string
152 */
153 public static String join(AbstractCollection<String> s, String delimiter) {
154 if (s.isEmpty()) return "";
155 Iterator<String> iter = s.iterator();
156 StringBuffer buffer = new StringBuffer(iter.next());
157 while (iter.hasNext()) {
158 buffer.append(delimiter);
159 buffer.append(iter.next());
160 }
161 return buffer.toString();
162 }
163
164 /**
165 * Parse comma separated path strings into a string array. This method

Callers 15

getInputFileMethod · 0.95
getAbsolutePathMethod · 0.95
runMethod · 0.95
processFsCommandMethod · 0.95
processShCommandMethod · 0.95
visitSparkOpMethod · 0.95
visitMethod · 0.95
visitTezOpMethod · 0.95
visitMethod · 0.95
addSettingsToConfMethod · 0.95
setAliasMethod · 0.95

Calls 6

iteratorMethod · 0.65
appendMethod · 0.65
isEmptyMethod · 0.45
nextMethod · 0.45
hasNextMethod · 0.45
toStringMethod · 0.45

Tested by 3

getInputFileMethod · 0.76
oneTimeTearDownMethod · 0.36