Skip to content
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
621a570
feat: time and time64 column support
shivanshuraj1333 Jul 17, 2025
8eba9b9
feat: add time and time64 support to codegen and column_gen.go
shivanshuraj1333 Jul 19, 2025
cf78e2a
test: add tests for time and time64 with setup and protocol wrappers
shivanshuraj1333 Jul 19, 2025
aeadbc7
chore: document time and time64 go type mappings in types.md
shivanshuraj1333 Jul 19, 2025
7c74e19
Merge branch 'main' into feat/issues/1579
SpencerTorres Jul 25, 2025
8b7ef7c
Update list
SpencerTorres Jul 25, 2025
3b9562e
Couple of additions
kavirajk Sep 25, 2025
64d22b6
Merge branch 'main' into kavirajk/time-time64-support
kavirajk Sep 25, 2025
ee17487
remove the need for license headers even in the template generators
kavirajk Sep 25, 2025
82defd1
Added following changes to time and time64 type
kavirajk Sep 26, 2025
dc62229
Fix column generate for Time type
kavirajk Sep 26, 2025
f4524e1
make sure `enable_time_time64_type` config is at right place
kavirajk Sep 28, 2025
47dc5e9
Fix some TYPES.md related docs and remarks
kavirajk Sep 29, 2025
ef43736
PR remark: Fix column.tpl correctly
kavirajk Oct 1, 2025
f7bc653
remove time.parse method
kavirajk Oct 1, 2025
b3bc01d
moving some repeated code to time helpers
kavirajk Oct 2, 2025
5325af3
remove the need for custom serialization handling for time and time64
kavirajk Oct 3, 2025
bd2fa17
vendoring custom ch-go to have updated time and time64 types
kavirajk Oct 3, 2025
b5d2ab8
Replace time.Time to time.Duration to work with Time and Time64
kavirajk Oct 3, 2025
5d8c820
Fix precision for time64 and split tests
kavirajk Oct 3, 2025
4b25e30
Merge branch 'main' into kavirajk/time-time64-support
kavirajk Oct 3, 2025
52eac54
update docs in TYPES.md
kavirajk Oct 3, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 54 additions & 10 deletions TYPES.md

Large diffs are not rendered by default.

16 changes: 0 additions & 16 deletions conn_http_test.go
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
// Licensed to ClickHouse, Inc. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. ClickHouse, Inc. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

package clickhouse

Expand Down
16 changes: 0 additions & 16 deletions lib/column/codegen/array.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
// Licensed to ClickHouse, Inc. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. ClickHouse, Inc. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

// Code generated by make codegen DO NOT EDIT.
// source: lib/column/codegen/array.tpl
Expand Down
22 changes: 6 additions & 16 deletions lib/column/codegen/column.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
// Licensed to ClickHouse, Inc. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. ClickHouse, Inc. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

// Code generated by make codegen DO NOT EDIT.
// source: lib/column/codegen/column.tpl
Expand Down Expand Up @@ -126,6 +110,10 @@ func (t Type) Column(name string, sc *ServerContext) (Interface, error) {
return &SharedVariant{name: name}, nil
case "Object('json')":
return &JSONObject{name: name, root: true, sc: sc}, nil
case "Time":
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like the changes here are inconsistent with what was generated. Was column_gen.go manually edited?

Also in column_gen.go it looks like Time has a prefix check, does it need a prefix check? I looked at the docs and it looks like Time is just Time. The only one that needs a prefix is Time64 since it has the precision defined

return &Time{name: name}, nil
case "Time64":
return &Time64{name: name}, nil
}

switch strType := string(t); {
Expand Down Expand Up @@ -180,6 +168,8 @@ var (
{{- range . }}
_ Interface = (*{{ .ChType }})(nil)
{{- end }}
_ Interface = (*Time)(nil)
_ Interface = (*Time64)(nil)
)

var (
Expand Down
16 changes: 0 additions & 16 deletions lib/column/codegen/dynamic.tpl
Original file line number Diff line number Diff line change
@@ -1,19 +1,3 @@
// Licensed to ClickHouse, Inc. under one or more contributor
// license agreements. See the NOTICE file distributed with
// this work for additional information regarding copyright
// ownership. ClickHouse, Inc. licenses this file to you under
// the Apache License, Version 2.0 (the "License"); you may
// not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

// Code generated by make codegen DO NOT EDIT.
// source: lib/column/codegen/dynamic.tpl
Expand Down
7 changes: 6 additions & 1 deletion lib/column/column_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading