Skip to content

Commit 59da9ae

Browse files
fix(@cubejs-backend/dremio-driver): CAST doesn't work on string timestamps: replace CAST to TO_TIMESTAMP (#1057)
* replece CAST to TO_TIMESTAMP * use TO_TIMESTAMP instead of CAST
1 parent b51f40f commit 59da9ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/cubejs-dremio-driver/driver/DremioQuery.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class DremioQuery extends BaseQuery {
3030
}
3131

3232
timeStampCast(value) {
33-
return `CAST(${value} as TIMESTAMP)`;
33+
return `TO_TIMESTAMP(${value}, 'YYYY-MM-DD"T"HH24:MI:SS.FFF')`;
3434
}
3535

3636
inDbTimeZone(date) {

0 commit comments

Comments
 (0)