MCPcopy Create free account
hub / github.com/apache/impala / deepCopy

Method deepCopy

fe/src/main/java/org/apache/impala/analysis/Expr.java:1293–1308  ·  view source on GitHub ↗

Create a deep copy of 'ls'. The elements of the returned list are of the same type as the input list.

(List<List<C>> ls)

Source from the content-addressed store, hash-verified

1291 * type as the input list.
1292 */
1293 public static <C extends Expr> List<List<C>> deepCopy(List<List<C>> ls) {
1294 Preconditions.checkNotNull(ls);
1295 List<List<C>> result = new ArrayList<>(ls.size());
1296 for (List<C> l : ls) {
1297 if (l == null) {
1298 result.add(null);
1299 continue;
1300 }
1301 List<C> l2 = new ArrayList<>(l.size());
1302 for (Expr element : l) {
1303 l2.add((C) element.clone());
1304 }
1305 result.add(l2);
1306 }
1307 return result;
1308 }
1309
1310 /**
1311 * Create a clone of the expression including analysis state with a different

Callers 15

MultiAggregateInfoMethod · 0.95
runTestCaseMethod · 0.45
parseOneTestCaseMethod · 0.45
addPartitionsMethod · 0.45
testAlterTableRenameMethod · 0.45
alterDatabaseTestMethod · 0.45
testEventBatchingMethod · 0.45
testCommitEventMethod · 0.45
testAbortEventMethod · 0.45

Calls 3

sizeMethod · 0.45
addMethod · 0.45
cloneMethod · 0.45

Tested by 13

runTestCaseMethod · 0.36
parseOneTestCaseMethod · 0.36
addPartitionsMethod · 0.36
testAlterTableRenameMethod · 0.36
alterDatabaseTestMethod · 0.36
testEventBatchingMethod · 0.36
testCommitEventMethod · 0.36
testAbortEventMethod · 0.36