Skip to content

Commit

Permalink
fix github ci error
Browse files Browse the repository at this point in the history
  • Loading branch information
vahid-sohrabloo committed Feb 25, 2024
1 parent 0d545ac commit 0d1d8e7
Show file tree
Hide file tree
Showing 16 changed files with 18 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,4 +61,4 @@ jobs:
uses: actions/checkout@v4

- name: Test
run: make test
run: make test
2 changes: 1 addition & 1 deletion column/array.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ func NewArray[T any](dataColumn Column[T]) *Array[T] {
ArrayBase: ArrayBase{
dataColumn: dataColumn,
offsetColumn: New[uint64](),
arrayChconnType: "column.Array[" + reflect.TypeOf((*T)(nil)).String() + "]",
arrayChconnType: "column.Array[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]",
},
}
a.resetHook = func() {
Expand Down
2 changes: 1 addition & 1 deletion column/array2.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewArray2[T any](array *Array[T]) *Array2[T] {
ArrayBase: ArrayBase{
dataColumn: array,
offsetColumn: New[uint64](),
arrayChconnType: "column.Array2[" + reflect.TypeOf((*T)(nil)).String() + "]",
arrayChconnType: "column.Array2[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]",
},
}
return a
Expand Down
2 changes: 1 addition & 1 deletion column/array2_nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewArray2Nullable[T any](dataColumn *ArrayNullable[T]) *Array2Nullable[T] {
ArrayBase: ArrayBase{
dataColumn: dataColumn,
offsetColumn: New[uint64](),
arrayChconnType: "column.Array2Nullable[" + reflect.TypeOf((*T)(nil)).String() + "]",
arrayChconnType: "column.Array2Nullable[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion column/array3.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ func NewArray3[T any](array *Array2[T]) *Array3[T] {
ArrayBase: ArrayBase{
dataColumn: array,
offsetColumn: New[uint64](),
arrayChconnType: "column.Array3[" + reflect.TypeOf((*T)(nil)).String() + "]",
arrayChconnType: "column.Array3[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]",
},
}
return a
Expand Down
2 changes: 1 addition & 1 deletion column/array3_nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ func NewArray3Nullable[T any](dataColumn *Array2Nullable[T]) *Array3Nullable[T]
ArrayBase: ArrayBase{
dataColumn: dataColumn,
offsetColumn: New[uint64](),
arrayChconnType: "column.Array3Nullable[" + reflect.TypeOf((*T)(nil)).String() + "]",
arrayChconnType: "column.Array3Nullable[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion column/array_nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewArrayNullable[T any](dataColumn NullableColumn[T]) *ArrayNullable[T] {
ArrayBase: ArrayBase{
dataColumn: dataColumn,
offsetColumn: New[uint64](),
arrayChconnType: "column.ArrayNullable[" + reflect.TypeOf((*T)(nil)).String() + "]",
arrayChconnType: "column.ArrayNullable[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]",
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion column/date_nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ func (c *DateNullable[T]) Validate(forInsert bool) error {
}

func (c *DateNullable[T]) chconnType() string {
return "DateNullable[" + reflect.TypeOf((*T)(nil)).String() + "]"
return "DateNullable[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]"
}

func (c *DateNullable[T]) structType() string {
Expand Down
4 changes: 2 additions & 2 deletions column/lc.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,9 @@ func (c *LowCardinality[T]) HeaderReader(r *readerwriter.Reader, readColumn bool

func (c *LowCardinality[T]) chconnType() string {
if c.nullable {
return "column.LowCardinalityNullable[" + reflect.TypeOf((*T)(nil)).String() + "]"
return "column.LowCardinalityNullable[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]"
}
return "column.LowCardinality[" + reflect.TypeOf((*T)(nil)).String() + "]"
return "column.LowCardinality[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]"
}

func (c *LowCardinality[T]) structType() string {
Expand Down
2 changes: 1 addition & 1 deletion column/map.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func NewMap[K comparable, V any](
keyColumn: keyColumn,
valueColumn: valueColumn,
offsetColumn: New[uint64](),
mapChconnType: "column.Map[" + reflect.TypeOf((*K)(nil)).String() + ", " + reflect.TypeOf((*V)(nil)).String() + "]",
mapChconnType: "column.Map[" + reflect.TypeOf((*K)(nil)).Elem().String() + ", " + reflect.TypeOf((*V)(nil)).Elem().String() + "]",
},
}
a.resetHook = func() {
Expand Down
2 changes: 1 addition & 1 deletion column/map_nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func NewMapNullable[K comparable, V any](
keyColumn: keyColumn,
valueColumn: valueColumn,
offsetColumn: New[uint64](),
mapChconnType: "MapNullable[]" + reflect.TypeOf((*K)(nil)).String() + ", " + reflect.TypeOf((*V)(nil)).String() + "]",
mapChconnType: "MapNullable[]" + reflect.TypeOf((*K)(nil)).Elem().String() + ", " + reflect.TypeOf((*V)(nil)).Elem().String() + "]",
},
},
}
Expand Down
4 changes: 2 additions & 2 deletions column/nothing.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ func NewNothing() *Nothing {
Base: Base[int8]{
size: size,
strict: true,
kind: reflect.TypeOf((*int8)(nil)).Kind(),
rtype: reflect.TypeOf((*int8)(nil)),
kind: reflect.TypeOf((*int8)(nil)).Elem().Kind(),
rtype: reflect.TypeOf((*int8)(nil)).Elem(),
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion column/string_base.go
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ func (c *StringBase[T]) Validate(forInsert bool) error {
}

func (c *StringBase[T]) chconnType() string {
return "column.StringBase[" + reflect.TypeOf((*T)(nil)).String() + "]"
return "column.StringBase[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]"
}

func (c *StringBase[T]) structType() string {
Expand Down
2 changes: 1 addition & 1 deletion column/string_nullable.go
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ func (c *StringNullable[T]) Validate(forInsert bool) error {
}

func (c *StringNullable[T]) chconnType() string {
return "StringNullable[" + reflect.TypeOf((*T)(nil)).String() + "]"
return "StringNullable[" + reflect.TypeOf((*T)(nil)).Elem().String() + "]"
}

func (c *StringNullable[T]) structType() string {
Expand Down
2 changes: 1 addition & 1 deletion column/variant_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ func TestVariant(t *testing.T) {
conn, err := chconn.Connect(context.Background(), connString)
require.NoError(t, err)

if conn.ServerInfo().MajorVersion < 24 && conn.ServerInfo().MinorVersion < 1 {
if conn.ServerInfo().MajorVersion < 24 {
t.Skipf("clickhouse-server version %d.%d does not support Variant type", conn.ServerInfo().MajorVersion, conn.ServerInfo().MinorVersion)
}
err = conn.Exec(context.Background(),
Expand Down
2 changes: 1 addition & 1 deletion select_stmt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ func TestSelectParameters(t *testing.T) {
assert.Equal(t, []int32{-15, -16}, colAS.Data()[0])
assert.Equal(t, "str'", colB.Data()[0])
assert.Equal(t, []string{"str", "str2\\'"}, colBS.Data()[0])
assert.Equal(t, "2022-08-04 18:30:53", colC.Data()[0].Format("2006-01-02 15:04:05"))
assert.Equal(t, "2022-08-04 18:30:53", colC.Data()[0].UTC().Format("2006-01-02 15:04:05"))
assert.Equal(t, map[string]uint8{
"a": 1,
"b": 2,
Expand Down

0 comments on commit 0d1d8e7

Please sign in to comment.