QueryPivot pivot1 = new QueryPivot();
pivot1.addColumn(new ScalarFunctionColumn(
Lists.newArrayList((AbstractColumn) new SimpleColumn("lunchTime")),
TimeComponentExtractor.getInstance(
TimeComponentExtractor.TimeComponent.HOUR)));
pivot1.addColumn(new ScalarFunctionColumn(
Lists.<AbstractColumn>newArrayList(
new SimpleColumn("seniorityStartTime"),
new SimpleColumn("hireDate")), DateDiff.getInstance()));
q1.setPivot(pivot1);