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

Method testFilters

tutorial/src/org/apache/pig/tutorial/TutorialTest.java:76–94  ·  view source on GitHub ↗
(FilterFunc filter, Tuple[] tuples)

Source from the content-addressed store, hash-verified

74 }
75
76 public static String[] testFilters (FilterFunc filter, Tuple[] tuples) {
77 List<String> res = new ArrayList<String>();
78 try {
79 for (Tuple t : tuples) {
80 if (filter.exec(t)) {
81 System.out.println("accepted: " + t);
82 res.add((String)t.get(0));
83 } else {
84 System.out.println("rejected: " + t);
85 }
86 }
87 } catch (Exception e) {
88 e.printStackTrace();
89 System.exit(1);
90 }
91
92 System.out.println("===");
93 return res.toArray(new String[res.size()]);
94 }
95
96 public static void main(String[] args) {
97 String[] queries = {

Callers 1

mainMethod · 0.95

Calls 5

toArrayMethod · 0.80
addMethod · 0.65
getMethod · 0.65
sizeMethod · 0.65
execMethod · 0.45

Tested by

no test coverage detected