Skip to content

Commit f6c1f03

Browse files
committed
fix tests
1 parent 760bc7a commit f6c1f03

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ jobs:
205205
runs-on: ubuntu-latest
206206
services:
207207
databend:
208-
image: datafuselabs/databend:v1.2.542-nightly
208+
image: datafuselabs/databend:v1.2.687-nightly
209209
env:
210210
QUERY_DEFAULT_USER: sqlancer
211211
QUERY_DEFAULT_PASSWORD: sqlancer

src/sqlancer/databend/ast/DatabendConstant.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,8 @@ public static class DatabendDateConstant extends DatabendConstant {
322322
public String textRepr;
323323

324324
public DatabendDateConstant(long val) {
325-
Timestamp timestamp = new Timestamp(val);
325+
long t = val % 250000000000000l;
326+
Timestamp timestamp = new Timestamp(t);
326327
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
327328
textRepr = dateFormat.format(timestamp);
328329
}
@@ -357,7 +358,8 @@ public static class DatabendTimestampConstant extends DatabendConstant {
357358
public String textRepr;
358359

359360
public DatabendTimestampConstant(long val) {
360-
Timestamp timestamp = new Timestamp(val);
361+
long t = val % 250000000000000l;
362+
Timestamp timestamp = new Timestamp(t);
361363
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
362364
textRepr = dateFormat.format(timestamp);
363365
}

0 commit comments

Comments
 (0)