mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-07 11:27:50 +00:00
travis suggetions
This commit is contained in:
parent
3140b2d8cb
commit
0acac34fee
2 changed files with 7 additions and 5 deletions
|
|
@ -3590,7 +3590,7 @@ func (e *executor) collectCallKeySets(ctx context.Context, indexName string, c *
|
|||
if fieldName != "" {
|
||||
idx, exists := e.Holder.indexes[indexName]
|
||||
if !exists {
|
||||
return errors.Errorf("index %s does not exist", indexName)
|
||||
return errors.Wrapf(ErrIndexNotFound, "%s", indexName)
|
||||
}
|
||||
if field := idx.Field(fieldName); field != nil && field.ForeignIndex() != "" {
|
||||
foreignIndexName := field.ForeignIndex()
|
||||
|
|
@ -3638,7 +3638,7 @@ func (e *executor) translateCall(indexName string, c *pql.Call, keyMaps map[stri
|
|||
colKey, rowKey, fieldName := c.TranslateInfo(columnLabel, rowLabel)
|
||||
idx, exists := e.Holder.indexes[indexName]
|
||||
if !exists {
|
||||
return errors.Errorf("index %s does not exist", indexName)
|
||||
return errors.Wrapf(ErrIndexNotFound, "%s", indexName)
|
||||
}
|
||||
if idx.Keys() {
|
||||
if c.Args[colKey] != nil && !isString(c.Args[colKey]) {
|
||||
|
|
|
|||
|
|
@ -4724,13 +4724,15 @@ func TestExecutor_Execute_NoIndex(t *testing.T) {
|
|||
defer c.Close()
|
||||
hldr := test.Holder{Holder: c[0].Server.Holder()}
|
||||
index := hldr.MustCreateIndexIfNotExists("i", *indexOptions)
|
||||
//_, err := index.CreateField("f", fieldOption...)
|
||||
index.CreateField("f")
|
||||
_, err := index.CreateField("f")
|
||||
if err != nil {
|
||||
t.Fatal("should work")
|
||||
}
|
||||
|
||||
if _, err := c[0].API.Query(context.Background(), &pilosa.QueryRequest{
|
||||
Index: "i",
|
||||
Query: "Count(Distinct(Row(gpu_tag='GTX'), index=systems, field=jarvis_id))",
|
||||
}); err == nil {
|
||||
}); errors.Cause(err) != pilosa.ErrIndexNotFound {
|
||||
t.Fatal("expecting error: 'index systems does not exist'")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue