mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-06 16:45:55 +00:00
Merge branch 'master' of github.com:pilosa/pilosa into retriction-frame
This commit is contained in:
commit
a39ab12ecc
3 changed files with 4 additions and 5 deletions
|
|
@ -537,7 +537,7 @@ func (e *Executor) executeSetBit(ctx context.Context, db string, c *pql.Call, op
|
|||
var timestamp *time.Time
|
||||
sTimestamp, ok := c.Args["timestamp"].(string)
|
||||
if ok {
|
||||
t, err := time.Parse("2006-01-02T15:04:05", sTimestamp)
|
||||
t, err := time.Parse(TimeFormat, sTimestamp)
|
||||
if err != nil {
|
||||
return false, fmt.Errorf("invalid date: %s", sTimestamp)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -420,7 +420,7 @@ func TestExecutor_Execute_Remote_SetBit_With_Timestamp(t *testing.T) {
|
|||
s.Handler.Executor.ExecuteFn = func(ctx context.Context, db string, query *pql.Query, slices []uint64, opt *pilosa.ExecOptions) ([]interface{}, error) {
|
||||
if db != `d` {
|
||||
t.Fatalf("unexpected db: %s", db)
|
||||
} else if query.String() != `SetBit(frame="f", id=10, profileID=2, timestamp="2016-12-11T10:09:07")` {
|
||||
} else if query.String() != `SetBit(frame="f", id=10, profileID=2, timestamp="2016-12-11T10:09")` {
|
||||
t.Fatalf("unexpected query: %s", query.String())
|
||||
}
|
||||
remoteCalled = true
|
||||
|
|
@ -445,7 +445,7 @@ func TestExecutor_Execute_Remote_SetBit_With_Timestamp(t *testing.T) {
|
|||
}
|
||||
|
||||
e := NewExecutor(idx.Index, c)
|
||||
if _, err := e.Execute(context.Background(), "d", MustParse(`SetBit(id=10, frame=f, profileID=2, timestamp="2016-12-11T10:09:07")`), nil, nil); err != nil {
|
||||
if _, err := e.Execute(context.Background(), "d", MustParse(`SetBit(id=10, frame=f, profileID=2, timestamp="2016-12-11T10:09")`), nil, nil); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -100,8 +100,7 @@ func (c *Call) String() string {
|
|||
case []uint64:
|
||||
fmt.Fprintf(&buf, "%v=%s", key, joinUint64Slice(v))
|
||||
case time.Time:
|
||||
layout := "2006-01-02T15:04:05"
|
||||
fmt.Fprintf(&buf, "%v=\"%s\"", key, v.Format(layout))
|
||||
fmt.Fprintf(&buf, "%v=\"%s\"", key, v.Format(TimeFormat))
|
||||
default:
|
||||
fmt.Fprintf(&buf, "%v=%v", key, v)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue