Skip to content

Commit

Permalink
Use Calcite terminology
Browse files Browse the repository at this point in the history
  • Loading branch information
olivrlee committed Mar 17, 2023
1 parent b481401 commit 42bb9fb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -956,10 +956,10 @@ private SqlLibraryOperators() {
OperandTypes.TIMESTAMP, OperandTypes.timestampInterval()),
SqlFunctionCategory.TIMEDATE);

/** The "DATETIME_TRUNC(datetime_expression, date_time_part)"
* function (BigQuery); truncates a DATETIME value to the granularity of
* date_time_part. The DATETIME value is always rounded to the beginning of
* date_time_part. */
/** The "DATETIME_TRUNC(timestamp, timeUnit)"
* function (BigQuery); truncates a timestamp value to the granularity of
* timeUnit. The timestamp value is always rounded to the beginning of
* timeUnit. */
@LibraryOperator(libraries = {BIG_QUERY})
public static final SqlFunction DATETIME_TRUNC =
SqlBasicFunction.create(
Expand Down
2 changes: 1 addition & 1 deletion site/_docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -2655,7 +2655,7 @@ BigQuery's type system uses confusingly different names for types and functions:
| b | DATETIME_ADD(timestamp, interval) | Returns the TIMESTAMP value that occurs *interval* after *timestamp*
| b | DATETIME_DIFF(timestamp, timestamp2, timeUnit) | Returns the whole number of *timeUnit* between *timestamp* and *timestamp2*
| b | DATETIME_SUB(timestamp, interval) | Returns the TIMESTAMP that occurs *interval* before *timestamp*
| b | DATETIME_TRUNC(datetimeExpression, timeUnit) | Truncates *datetimeExpression* to the granularity of *timeUnit*, rounding to the beginning of the unit
| b | DATETIME_TRUNC(timestamp, timeUnit) | Truncates *timestamp* to the granularity of *timeUnit*, rounding to the beginning of the unit
| b | DATE_FROM_UNIX_DATE(integer) | Returns the DATE that is *integer* days after 1970-01-01
| p | DATE_PART(timeUnit, datetime) | Equivalent to `EXTRACT(timeUnit FROM datetime)`
| b | DATE_ADD(date, interval) | Returns the DATE value that occurs *interval* after *date*
Expand Down

0 comments on commit 42bb9fb

Please sign in to comment.