Skip to content

Commit

Permalink
fix: omit tables length check
Browse files Browse the repository at this point in the history
  • Loading branch information
daviderli614 committed Aug 14, 2024
1 parent 36e639d commit fab89ca
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion examples/object/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func (Monitor) TableName() string {
func initData() []Monitor {
return []Monitor{
{
Host: "127.0.0.1",
//Host: "127.0.0.1",
Memory: 1,
Cpu: 1.3,
Temperature: -1,
Expand Down
2 changes: 1 addition & 1 deletion request/request.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ func (r *Request) WithTables(tables ...*table.Table) *Request {
}

func (r *Request) IsZero() bool {
return r.tables == nil || len(r.tables) == 0
return r.tables == nil
}

func (r *Request) Build() (*gpb.GreptimeRequest, error) {
Expand Down
3 changes: 0 additions & 3 deletions schema/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -183,9 +183,6 @@ func parseValue(typ gpb.ColumnDataType, val reflect.Value) (*gpb.Value, error) {
if !val.IsValid() {
return nil, nil
}
if val.Kind() == reflect.Pointer && val.IsNil() {
return nil, nil
}

switch typ {
case gpb.ColumnDataType_INT8, gpb.ColumnDataType_INT16, gpb.ColumnDataType_INT32, gpb.ColumnDataType_INT64:
Expand Down

0 comments on commit fab89ca

Please sign in to comment.