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

Method exec

src/org/apache/pig/builtin/GetWeek.java:75–82  ·  view source on GitHub ↗
(Tuple input)

Source from the content-addressed store, hash-verified

73public class GetWeek extends EvalFunc<Integer> {
74
75 @Override
76 public Integer exec(Tuple input) throws IOException {
77 if (input == null || input.size() < 1 || input.get(0) == null) {
78 return null;
79 }
80
81 return ((DateTime) input.get(0)).getWeekOfWeekyear();
82 }
83
84 @Override
85 public Schema outputSchema(Schema input) {

Callers 1

testGetDateTimeFieldMethod · 0.95

Calls 2

sizeMethod · 0.65
getMethod · 0.65

Tested by 1

testGetDateTimeFieldMethod · 0.76