Skip to content

Commit 728746f

Browse files
committed
dev
1 parent 1dfe551 commit 728746f

File tree

17 files changed

+17
-0
lines changed

17 files changed

+17
-0
lines changed

packages/cubejs-databricks-jdbc-driver/src/DatabricksQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const GRANULARITY_TO_INTERVAL: Record<string, string> = {
88
hour: 'hour',
99
minute: 'minute',
1010
second: 'second',
11+
millisecond: 'millisecond',
1112
month: 'month',
1213
quarter: 'quarter',
1314
year: 'year'

packages/cubejs-druid-driver/src/DruidQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ const GRANULARITY_TO_INTERVAL: Record<string, (date: string) => string> = {
77
hour: date => `DATE_TRUNC('hour', ${date})`,
88
minute: date => `DATE_TRUNC('minute', ${date})`,
99
second: date => `DATE_TRUNC('second', ${date})`,
10+
millisecond: date => `DATE_TRUNC('millisecond', ${date})`,
1011
month: date => `DATE_TRUNC('month', ${date})`,
1112
quarter: date => `DATE_TRUNC('quarter', ${date})`,
1213
year: date => `DATE_TRUNC('year', ${date})`

packages/cubejs-duckdb-driver/src/DuckDBQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const GRANULARITY_TO_INTERVAL: Record<string, (date: string) => string> = {
66
hour: date => `DATE_TRUNC('hour', ${date})`,
77
minute: date => `DATE_TRUNC('minute', ${date})`,
88
second: date => `DATE_TRUNC('second', ${date})`,
9+
millisecond: date => `DATE_TRUNC('millisecond', ${date})`,
910
month: date => `DATE_TRUNC('month', ${date})`,
1011
quarter: date => `DATE_TRUNC('quarter', ${date})`,
1112
year: date => `DATE_TRUNC('year', ${date})`

packages/cubejs-firebolt-driver/src/FireboltQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const GRANULARITY_TO_INTERVAL: Record<string, string> = {
66
hour: 'HOUR',
77
minute: 'MINUTE',
88
second: 'SECOND',
9+
millisecond: 'MILLISECOND',
910
month: 'MONTH',
1011
quarter: 'QUARTER',
1112
year: 'YEAR'

packages/cubejs-questdb-driver/src/QuestQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { BaseFilter, BaseQuery, ParamAllocator } from '@cubejs-backend/schema-co
22

33
const GRANULARITY_TO_INTERVAL: Record<string, string> = {
44
second: 's',
5+
millisecond: 'T',
56
minute: 'm',
67
hour: 'h',
78
day: 'd',

packages/cubejs-schema-compiler/src/adapter/BigqueryQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const GRANULARITY_TO_INTERVAL = {
99
hour: 'HOUR',
1010
minute: 'MINUTE',
1111
second: 'SECOND',
12+
millisecond: 'MILLISECOND',
1213
month: 'MONTH',
1314
quarter: 'QUARTER',
1415
year: 'YEAR'

packages/cubejs-schema-compiler/src/adapter/ClickHouseQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const GRANULARITY_TO_INTERVAL = {
99
hour: 'Hour',
1010
minute: 'Minute',
1111
second: 'Second',
12+
millisecond: 'Millisecond',
1213
month: 'Month',
1314
quarter: 'Quarter',
1415
year: 'Year',

packages/cubejs-schema-compiler/src/adapter/CubeStoreQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const GRANULARITY_TO_INTERVAL: Record<string, string> = {
1010
hour: 'hour',
1111
minute: 'minute',
1212
second: 'second',
13+
millisecond: 'millisecond',
1314
month: 'month',
1415
quarter: 'quarter',
1516
year: 'year'

packages/cubejs-schema-compiler/src/adapter/ElasticSearchQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const GRANULARITY_TO_INTERVAL = {
1010
hour: date => `DATE_TRUNC('hour', ${date}::datetime)`,
1111
minute: date => `DATE_TRUNC('minute', ${date}::datetime)`,
1212
second: date => `DATE_TRUNC('second', ${date}::datetime)`,
13+
millisecond: date => `DATE_TRUNC('millisecond', ${date}::datetime)`,
1314
month: date => `DATE_TRUNC('month', ${date}::datetime)`,
1415
quarter: date => `DATE_TRUNC('quarter', ${date}::datetime)`,
1516
year: date => `DATE_TRUNC('year', ${date}::datetime)`

packages/cubejs-schema-compiler/src/adapter/HiveQuery.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ const GRANULARITY_TO_INTERVAL = {
99
hour: (date) => `DATE_FORMAT(${date}, 'yyyy-MM-dd HH:00:00.000')`,
1010
minute: (date) => `DATE_FORMAT(${date}, 'yyyy-MM-dd HH:mm:00.000')`,
1111
second: (date) => `DATE_FORMAT(${date}, 'yyyy-MM-dd HH:mm:ss.000')`,
12+
millisecond: (date) => `DATE_FORMAT(${date}, 'yyyy-MM-dd HH:mm:ss.SSS')`,
1213
month: (date) => `DATE_FORMAT(${date}, 'yyyy-MM-01 00:00:00.000')`,
1314
year: (date) => `DATE_FORMAT(${date}, 'yyyy-01-01 00:00:00.000')`
1415
};

0 commit comments

Comments
 (0)