List<AbstractColumn> aggregationColumns =
Lists.newArrayList((AbstractColumn) new AggregationColumn(
new SimpleColumn("simpleColumn"), AggregationType.MIN));
ScalarFunctionColumnTitle titleYear =
new ScalarFunctionColumnTitle(Lists.<Value>newArrayList(),
new ScalarFunctionColumn(simpleColumns,
TimeComponentExtractor.getInstance(
TimeComponentExtractor.TimeComponent.YEAR)));
ScalarFunctionColumnTitle titleSecondWithAggregation =
new ScalarFunctionColumnTitle(Lists.<Value>newArrayList(),
new ScalarFunctionColumn(aggregationColumns,
TimeComponentExtractor.getInstance(
TimeComponentExtractor.TimeComponent.SECOND)));
ScalarFunctionColumnTitle titleMonthWithPivot =
new ScalarFunctionColumnTitle(Lists.newArrayList(new NumberValue(3.14),
BooleanValue.TRUE), new ScalarFunctionColumn(simpleColumns,
TimeComponentExtractor.getInstance(
TimeComponentExtractor.TimeComponent.MONTH)));
ScalarFunctionColumnTitle titleDayWithPivotAndAgg =
new ScalarFunctionColumnTitle(Lists.newArrayList(new NumberValue(3.14),
BooleanValue.TRUE), new ScalarFunctionColumn(aggregationColumns,
TimeComponentExtractor.getInstance(
TimeComponentExtractor.TimeComponent.DAY)));
ColumnDescription resultColumnDescriptionYear = titleYear.createColumnDescription(table);