(Tuple input)
| 73 | public class GetHour 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)).getHourOfDay(); |
| 82 | } |
| 83 | |
| 84 | @Override |
| 85 | public Schema outputSchema(Schema input) { |