Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 4668557

Browse files
authored
Merge pull request ClickHouse#266 from pikot/master
date and datetime can be unsigned
2 parents 4c3871c + e8f88dd commit 4668557

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/column/date.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ func (dt *Date) Write(encoder *binary.Encoder, v interface{}) error {
3030
return encoder.Int16(value)
3131
case int32:
3232
timestamp = int64(value) + dt.offset
33+
case uint32:
34+
timestamp = int64(value) + dt.offset
35+
case uint64:
36+
timestamp = int64(value) + dt.offset
3337
case int64:
3438
timestamp = value + dt.offset
3539
case string:

lib/column/datetime.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ func (dt *DateTime) Write(encoder *binary.Encoder, v interface{}) error {
3030
timestamp = int64(value)
3131
case int32:
3232
timestamp = int64(value)
33+
case uint32:
34+
timestamp = int64(value)
35+
case uint64:
36+
timestamp = int64(value)
3337
case int64:
3438
timestamp = value
3539
case string:

0 commit comments

Comments
 (0)