Adding 'date_trunc' as a built-in function.
'date_trunc' is common in other databases, but Spark or Hive does not have support for this.
We do have 'trunc' but this only works with 'MONTH' and 'YEAR' level on the DateType input. ( https://spark.apache.org/docs/2.2.0/api/java/org/apache/spark/sql/functions.html#trunc-org.apache.spark.sql.Column-java.lang.String- )
'date_trunc' on other databases:
AWS Redshift: http://docs.aws.amazon.com/redshift/latest/dg/r_DATE_TRUNC.html