@@ -762,19 +762,19 @@ export abstract class Expression {
762762 /* Excluded from this release type: _readUserData */
763763 timestampAdd(unit : Expression , amount : Expression ): FunctionExpression ;
764764 /* Excluded from this release type: _readUserData */
765- timestampAdd(unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' , amount : number ): FunctionExpression ;
765+ timestampAdd(unit : TimeUnit , amount : number ): FunctionExpression ;
766766 /* Excluded from this release type: _readUserData */
767767 timestampDiff(start : Expression , unit : Expression ): FunctionExpression ;
768768 /* Excluded from this release type: _readUserData */
769- timestampDiff(start : string | Expression , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' ): FunctionExpression ;
769+ timestampDiff(start : string | Expression , unit : TimeUnit ): FunctionExpression ;
770770 /* Excluded from this release type: _readUserData */
771771 timestampExtract(part : TimePart , timezone ? : string | Expression ): FunctionExpression ;
772772 /* Excluded from this release type: _readUserData */
773773 timestampExtract(part : Expression , timezone ? : string | Expression ): FunctionExpression ;
774774 /* Excluded from this release type: _readUserData */
775775 timestampSubtract(unit : Expression , amount : Expression ): FunctionExpression ;
776776 /* Excluded from this release type: _readUserData */
777- timestampSubtract(unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' , amount : number ): FunctionExpression ;
777+ timestampSubtract(unit : TimeUnit , amount : number ): FunctionExpression ;
778778 /* Excluded from this release type: _readUserData */
779779 timestampToUnixMicros(): FunctionExpression ;
780780 /* Excluded from this release type: _readUserData */
@@ -1487,7 +1487,7 @@ export function sum(fieldName: string): AggregateFunction;
14871487export function switchOn(condition : BooleanExpression , result : Expression , ... others : Array <BooleanExpression | Expression >): FunctionExpression ;
14881488
14891489// @beta
1490- export type TimeGranularity = ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' | ' week' | ' week(monday)' | ' week(tuesday)' | ' week(wednesday)' | ' week(thursday)' | ' week(friday)' | ' week(saturday)' | ' week(sunday)' | ' isoWeek ' | ' month' | ' quarter' | ' year' | ' isoYear ' ;
1490+ export type TimeGranularity = TimeUnit | ' week' | ' week(monday)' | ' week(tuesday)' | ' week(wednesday)' | ' week(thursday)' | ' week(friday)' | ' week(saturday)' | ' week(sunday)' | ' isoweek ' | ' month' | ' quarter' | ' year' | ' isoyear ' ;
14911491
14921492// @beta
14931493export type TimePart = TimeGranularity | ' dayofweek' | ' dayofyear' ;
@@ -1496,22 +1496,22 @@ export type TimePart = TimeGranularity | 'dayofweek' | 'dayofyear';
14961496export function timestampAdd(timestamp : Expression , unit : Expression , amount : Expression ): FunctionExpression ;
14971497
14981498// @beta
1499- export function timestampAdd(timestamp : Expression , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' , amount : number ): FunctionExpression ;
1499+ export function timestampAdd(timestamp : Expression , unit : TimeUnit , amount : number ): FunctionExpression ;
15001500
15011501// @beta
1502- export function timestampAdd(fieldName : string , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' , amount : number ): FunctionExpression ;
1502+ export function timestampAdd(fieldName : string , unit : TimeUnit , amount : number ): FunctionExpression ;
15031503
15041504// @beta
1505- export function timestampDiff(endFieldName : string , startFieldName : string , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' | Expression ): FunctionExpression ;
1505+ export function timestampDiff(endFieldName : string , startFieldName : string , unit : TimeUnit | Expression ): FunctionExpression ;
15061506
15071507// @beta
1508- export function timestampDiff(endFieldName : string , startExpression : Expression , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' | Expression ): FunctionExpression ;
1508+ export function timestampDiff(endFieldName : string , startExpression : Expression , unit : TimeUnit | Expression ): FunctionExpression ;
15091509
15101510// @beta
1511- export function timestampDiff(endExpression : Expression , startFieldName : string , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' | Expression ): FunctionExpression ;
1511+ export function timestampDiff(endExpression : Expression , startFieldName : string , unit : TimeUnit | Expression ): FunctionExpression ;
15121512
15131513// @beta
1514- export function timestampDiff(endExpression : Expression , startExpression : Expression , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' | Expression ): FunctionExpression ;
1514+ export function timestampDiff(endExpression : Expression , startExpression : Expression , unit : TimeUnit | Expression ): FunctionExpression ;
15151515
15161516// @beta
15171517export function timestampExtract(fieldName : string , part : TimePart , timezone ? : string | Expression ): FunctionExpression ;
@@ -1529,10 +1529,10 @@ export function timestampExtract(timestampExpression: Expression, part: Expressi
15291529export function timestampSubtract(timestamp : Expression , unit : Expression , amount : Expression ): FunctionExpression ;
15301530
15311531// @beta
1532- export function timestampSubtract(timestamp : Expression , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' , amount : number ): FunctionExpression ;
1532+ export function timestampSubtract(timestamp : Expression , unit : TimeUnit , amount : number ): FunctionExpression ;
15331533
15341534// @beta
1535- export function timestampSubtract(fieldName : string , unit : ' microsecond ' | ' millisecond ' | ' second ' | ' minute ' | ' hour ' | ' day ' , amount : number ): FunctionExpression ;
1535+ export function timestampSubtract(fieldName : string , unit : TimeUnit , amount : number ): FunctionExpression ;
15361536
15371537// @beta
15381538export function timestampToUnixMicros(expr : Expression ): FunctionExpression ;
@@ -1564,6 +1564,9 @@ export function timestampTruncate(timestampExpression: Expression, granularity:
15641564// @beta
15651565export function timestampTruncate(timestampExpression : Expression , granularity : Expression , timezone ? : string | Expression ): FunctionExpression ;
15661566
1567+ // @beta
1568+ export type TimeUnit = ' microsecond' | ' millisecond' | ' second' | ' minute' | ' hour' | ' day' ;
1569+
15671570// @beta
15681571export function toLower(fieldName : string ): FunctionExpression ;
15691572
0 commit comments