Remove ColumnLabel support

This commit is contained in:
Travis Turner 2018-03-26 15:35:56 -05:00
parent 2a8172b2a3
commit b2b0fd081a
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
18 changed files with 201 additions and 365 deletions

View file

@ -267,12 +267,11 @@ First, follow the instruction in the [getting started](../getting-started/) guid
The option cacheSize should be set as amount of chembl_id to calculate effectively for the whole data set, so we need to calculate amount of chembl_id. We have total 1678393 chembl_id (it will displayed after import_from_sdf.py script running), then the cacheSize should be >= 1678393
```
curl localhost:10101/index/mole \
-X POST \
-d '{"options": {"columnLabel": "position_id"}}'
-X POST
curl localhost:10101/index/mole/frame/fingerprint \
-X POST \
-d '{"options": {"rowLabel": "chembl_id", "inverseEnabled": true, "cacheSize": 2000000, "cacheType": "ranked"}}'
-d '{"options": {"inverseEnabled": true, "cacheSize": 2000000, "cacheType": "ranked"}}'
```
@ -302,7 +301,7 @@ Return chembl_id = 6223. This script uses Pilosas Intersection query to get a
* Query all chembl_id that have all "on" positions from the inverse view, return list of chembl_id
```python
bit_maps = ["Bitmap(position_id=%s, frame=%s, inversed=%s)" % (f, frame, True) for f in fp]
bit_maps = ["Bitmap(col=%s, frame=%s, inversed=%s)" % (f, frame, True) for f in fp]
bitmap_string = ', '.join(bit_maps)
intersection = "Intersect(%s)" % bitmap_string
mole_ids = requests.post("http://%s/index/%s/query" % (host, db), data=intersection).json()["results"][0]["bits"]
@ -312,7 +311,7 @@ Return chembl_id = 6223. This script uses Pilosas Intersection query to get a
```python
for m in mole_ids:
mol = requests.post("http://%s/index/%s/query" % (host, db), data="Bitmap(chembl_id=%s, frame=%s)" % (m, frame)).json()["results"][0]["bits"]
mol = requests.post("http://%s/index/%s/query" % (host, db), data="Bitmap(row=%s, frame=%s)" % (m, frame)).json()["results"][0]["bits"]
existed_mol = False
if len(mol) == len(fp):
found = m
@ -331,7 +330,7 @@ Return chembl_id = [6223, 269758, 6206, 6228]. This script uses Pilosas TopN
* Query Pilosas TopN to get list of similarity chembl_id
```python
query_string = 'TopN(Bitmap(chembl_id=6223, frame="fingerprint"), frame="fingerprint", n=2000000, tanimotoThreshold=70)'
query_string = 'TopN(Bitmap(row=6223, frame="fingerprint"), frame="fingerprint", n=2000000, tanimotoThreshold=70)'
topn = requests.post("http://127.0.0.1:10101/index/mol/query" , data=query_string)
```

View file

@ -80,7 +80,6 @@ func (e *Executor) Execute(ctx context.Context, index string, q *pql.Query, slic
// MaxSlice can differ between inverse and standard views, so we need
// to send queries to different slices based on orientation.
var inverseSlices []uint64
columnLabel := DefaultColumnLabel
// If slices aren't specified, then include all of them.
if len(slices) == 0 {
@ -105,9 +104,6 @@ func (e *Executor) Execute(ctx context.Context, index string, q *pql.Query, slic
for i := range inverseSlices {
inverseSlices[i] = uint64(i)
}
// Fetch column label from index.
columnLabel = idx.ColumnLabel()
}
}
@ -132,7 +128,7 @@ func (e *Executor) Execute(ctx context.Context, index string, q *pql.Query, slic
}
// If this call is to an inverse frame send to a different list of slices.
if call.IsInverse(DefaultRowLabel, columnLabel) {
if call.IsInverse(DefaultRowLabel, DefaultColumnLabel) {
slices = inverseSlices
}
}
@ -266,8 +262,7 @@ func (e *Executor) executeBitmapCall(ctx context.Context, index string, c *pql.C
} else {
idx := e.Holder.Index(index)
if idx != nil {
columnLabel := idx.ColumnLabel()
if columnID, ok, err := c.UintArg(columnLabel); ok && err == nil {
if columnID, ok, err := c.UintArg(DefaultColumnLabel); ok && err == nil {
attrs, err := idx.ColumnAttrStore().Attrs(columnID)
if err != nil {
return nil, err
@ -522,7 +517,6 @@ func (e *Executor) executeBitmapSlice(ctx context.Context, index string, c *pql.
if idx == nil {
return nil, ErrIndexNotFound
}
columnLabel := idx.ColumnLabel()
// Fetch frame & row label based on argument.
frame, _ := c.Args["frame"].(string)
@ -536,14 +530,14 @@ func (e *Executor) executeBitmapSlice(ctx context.Context, index string, c *pql.
// Return an error if both the row and column label are specified.
rowID, rowOK, rowErr := c.UintArg(DefaultRowLabel)
columnID, columnOK, columnErr := c.UintArg(columnLabel)
columnID, columnOK, columnErr := c.UintArg(DefaultColumnLabel)
if rowErr != nil || columnErr != nil {
return nil, fmt.Errorf("Bitmap() error with arg for col: %v or row: %v", columnErr, rowErr)
}
if rowOK && columnOK {
return nil, fmt.Errorf("Bitmap() cannot specify both %s and %s values", DefaultRowLabel, columnLabel)
return nil, fmt.Errorf("Bitmap() cannot specify both %s and %s values", DefaultRowLabel, DefaultColumnLabel)
} else if !rowOK && !columnOK {
return nil, fmt.Errorf("Bitmap() must specify either %s or %s values", DefaultRowLabel, columnLabel)
return nil, fmt.Errorf("Bitmap() must specify either %s or %s values", DefaultRowLabel, DefaultColumnLabel)
}
// Determine row or column orientation.
@ -602,7 +596,6 @@ func (e *Executor) executeRangeSlice(ctx context.Context, index string, c *pql.C
if idx == nil {
return nil, ErrIndexNotFound
}
columnLabel := idx.ColumnLabel()
// Retrieve base frame.
f := idx.Frame(frame)
@ -611,7 +604,7 @@ func (e *Executor) executeRangeSlice(ctx context.Context, index string, c *pql.C
}
// Read row & column id.
columnID, columnOK, err := c.UintArg(columnLabel)
columnID, columnOK, err := c.UintArg(DefaultColumnLabel)
if err != nil {
return nil, fmt.Errorf("executeRangeSlice - reading column: %v", err)
}
@ -624,9 +617,9 @@ func (e *Executor) executeRangeSlice(ctx context.Context, index string, c *pql.C
var id uint64
var viewName string
if columnOK && rowOK {
return nil, fmt.Errorf("Range() cannot contain both %q and %q", columnLabel, DefaultRowLabel)
return nil, fmt.Errorf("Range() cannot contain both %q and %q", DefaultColumnLabel, DefaultRowLabel)
} else if !columnOK && !rowOK {
return nil, fmt.Errorf("Range() must specify either %q or %q", columnLabel, DefaultRowLabel)
return nil, fmt.Errorf("Range() must specify either %q or %q", DefaultColumnLabel, DefaultRowLabel)
} else if columnOK {
viewName, id = ViewInverse, columnID
} else {
@ -899,9 +892,6 @@ func (e *Executor) executeClearBit(ctx context.Context, index string, c *pql.Cal
return false, ErrFrameNotFound
}
// Retrieve labels.
columnLabel := idx.ColumnLabel()
// Read fields using labels.
rowID, ok, err := c.UintArg(DefaultRowLabel)
if err != nil {
@ -910,11 +900,11 @@ func (e *Executor) executeClearBit(ctx context.Context, index string, c *pql.Cal
return false, fmt.Errorf("ClearBit() row field '%v' required", DefaultRowLabel)
}
colID, ok, err := c.UintArg(columnLabel)
colID, ok, err := c.UintArg(DefaultColumnLabel)
if err != nil {
return false, fmt.Errorf("reading ClearBit() column: %v", err)
} else if !ok {
return false, fmt.Errorf("ClearBit col field '%v' required", columnLabel)
return false, fmt.Errorf("ClearBit col field '%v' required", DefaultColumnLabel)
}
// Clear bits for each view.
@ -992,9 +982,6 @@ func (e *Executor) executeSetBit(ctx context.Context, index string, c *pql.Call,
return false, ErrFrameNotFound
}
// Retrieve labels.
columnLabel := idx.ColumnLabel()
// Read fields using labels.
rowID, ok, err := c.UintArg(DefaultRowLabel)
if err != nil {
@ -1003,11 +990,11 @@ func (e *Executor) executeSetBit(ctx context.Context, index string, c *pql.Call,
return false, fmt.Errorf("SetBit() row field '%v' required", DefaultRowLabel)
}
colID, ok, err := c.UintArg(columnLabel)
colID, ok, err := c.UintArg(DefaultColumnLabel)
if err != nil {
return false, fmt.Errorf("reading SetBit() column: %v", err)
} else if !ok {
return false, fmt.Errorf("SetBit() column field '%v' required", columnLabel)
return false, fmt.Errorf("SetBit() column field '%v' required", DefaultColumnLabel)
}
var timestamp *time.Time
@ -1086,13 +1073,6 @@ func (e *Executor) executeSetFieldValue(ctx context.Context, index string, c *pq
return errors.New("SetFieldValue() frame required")
}
// Retrieve column label.
idx := e.Holder.Index(index)
if idx == nil {
return ErrIndexNotFound
}
columnLabel := idx.ColumnLabel()
// Retrieve frame.
frame := e.Holder.Frame(index, frameName)
if frame == nil {
@ -1100,11 +1080,11 @@ func (e *Executor) executeSetFieldValue(ctx context.Context, index string, c *pq
}
// Parse labels.
columnID, ok, err := c.UintArg(columnLabel)
columnID, ok, err := c.UintArg(DefaultColumnLabel)
if err != nil {
return fmt.Errorf("reading SetFieldValue() column: %v", err)
} else if !ok {
return fmt.Errorf("SetFieldValue() column field '%v' required", columnLabel)
return fmt.Errorf("SetFieldValue() column field '%v' required", DefaultColumnLabel)
}
// Copy args and remove reserved fields.
@ -1112,7 +1092,7 @@ func (e *Executor) executeSetFieldValue(ctx context.Context, index string, c *pq
delete(args, "frame")
// While frame could technically work as a ColumnAttr argument, we are treating it as a reserved word primarily to avoid confusion.
// Also, if we ever need to make ColumnAttrs frame-specific, then having this reserved word prevents backward incompatibility.
delete(args, columnLabel)
delete(args, DefaultColumnLabel)
// Set values.
for name, value := range args {
@ -1304,28 +1284,18 @@ func (e *Executor) executeSetColumnAttrs(ctx context.Context, index string, c *p
return ErrIndexNotFound
}
var colName string
id, okID, errID := c.UintArg("id")
if errID != nil || !okID {
// Retrieve columnLabel
columnLabel := idx.columnLabel
col, okCol, errCol := c.UintArg(columnLabel)
if errCol != nil || !okCol {
return fmt.Errorf("reading SetColumnAttrs() id/columnLabel errs: %v/%v found %v/%v", errID, errCol, okID, okCol)
}
id = col
colName = columnLabel
} else {
colName = "id"
col, okCol, errCol := c.UintArg(DefaultColumnLabel)
if errCol != nil || !okCol {
return fmt.Errorf("reading SetColumnAttrs() col errs: %v found %v", errCol, okCol)
}
// Copy args and remove reserved fields.
attrs := pql.CopyArgs(c.Args)
delete(attrs, colName)
delete(attrs, DefaultColumnLabel)
delete(attrs, "frame")
// Set attributes.
if err := idx.ColumnAttrStore().SetAttrs(id, attrs); err != nil {
if err := idx.ColumnAttrStore().SetAttrs(col, attrs); err != nil {
return err
}
idx.Stats.Count("SetProfileAttrs", 1, 1.0)

View file

@ -42,9 +42,9 @@ func TestExecutor_Execute_Bitmap(t *testing.T) {
// Set bits.
if _, err := e.Execute(context.Background(), "i", test.MustParse(``+
fmt.Sprintf("SetBit(frame=f, row=%d, columnID=%d)\n", 10, 3)+
fmt.Sprintf("SetBit(frame=f, row=%d, columnID=%d)\n", 10, SliceWidth+1)+
fmt.Sprintf("SetBit(frame=f, row=%d, columnID=%d)\n", 20, SliceWidth+1),
fmt.Sprintf("SetBit(frame=f, row=%d, col=%d)\n", 10, 3)+
fmt.Sprintf("SetBit(frame=f, row=%d, col=%d)\n", 10, SliceWidth+1)+
fmt.Sprintf("SetBit(frame=f, row=%d, col=%d)\n", 20, SliceWidth+1),
), nil, nil); err != nil {
t.Fatal(err)
}
@ -91,9 +91,9 @@ func TestExecutor_Execute_Bitmap(t *testing.T) {
// Set bits.
if _, err := e.Execute(context.Background(), "i", test.MustParse(``+
fmt.Sprintf("SetBit(frame=f, row=%d, columnID=%d)\n", 10, 3)+
fmt.Sprintf("SetBit(frame=f, row=%d, columnID=%d)\n", 10, SliceWidth+1)+
fmt.Sprintf("SetBit(frame=f, row=%d, columnID=%d)\n", 20, SliceWidth+1),
fmt.Sprintf("SetBit(frame=f, row=%d, col=%d)\n", 10, 3)+
fmt.Sprintf("SetBit(frame=f, row=%d, col=%d)\n", 10, SliceWidth+1)+
fmt.Sprintf("SetBit(frame=f, row=%d, col=%d)\n", 20, SliceWidth+1),
), nil, nil); err != nil {
t.Fatal(err)
}
@ -101,7 +101,7 @@ func TestExecutor_Execute_Bitmap(t *testing.T) {
t.Fatal(err)
}
if res, err := e.Execute(context.Background(), "i", test.MustParse(fmt.Sprintf(`Bitmap(columnID=%d, frame=f)`, SliceWidth+1)), nil, nil); err != nil {
if res, err := e.Execute(context.Background(), "i", test.MustParse(fmt.Sprintf(`Bitmap(col=%d, frame=f)`, SliceWidth+1)), nil, nil); err != nil {
t.Fatal(err)
} else if bits := res[0].(*pilosa.Bitmap).Bits(); !reflect.DeepEqual(bits, []uint64{10, 20}) {
t.Fatalf("unexpected bits: %+v", bits)
@ -251,7 +251,7 @@ func TestExecutor_Execute_SetBit(t *testing.T) {
t.Fatalf("unexpected bitmap count: %d", n)
}
if res, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=11, frame=f, columnID=1)`), nil, nil); err != nil {
if res, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=11, frame=f, col=1)`), nil, nil); err != nil {
t.Fatal(err)
} else {
if !res[0].(bool) {
@ -262,7 +262,7 @@ func TestExecutor_Execute_SetBit(t *testing.T) {
if n := f.Row(11).Count(); n != 1 {
t.Fatalf("unexpected bitmap count: %d", n)
}
if res, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=11, frame=f, columnID=1)`), nil, nil); err != nil {
if res, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=11, frame=f, col=1)`), nil, nil); err != nil {
t.Fatal(err)
} else {
if res[0].(bool) {
@ -293,9 +293,9 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) {
// Set field values.
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(columnID=10, frame=f, field0=25, field1=2)`), nil, nil); err != nil {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(col=10, frame=f, field0=25, field1=2)`), nil, nil); err != nil {
t.Fatal(err)
} else if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(columnID=100, frame=f, field0=10)`), nil, nil); err != nil {
} else if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(col=100, frame=f, field0=10)`), nil, nil); err != nil {
t.Fatal(err)
}
@ -340,28 +340,28 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) {
t.Run("ErrFrameRequired", func(t *testing.T) {
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(columnID=10, field0=100)`), nil, nil); err == nil || err.Error() != `SetFieldValue() frame required` {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(col=10, field0=100)`), nil, nil); err == nil || err.Error() != `SetFieldValue() frame required` {
t.Fatalf("unexpected error: %s", err)
}
})
t.Run("ErrColumnFieldRequired", func(t *testing.T) {
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(invalid_column_name=10, frame=f, field0=100)`), nil, nil); err == nil || err.Error() != `SetFieldValue() column field 'columnID' required` {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(invalid_column_name=10, frame=f, field0=100)`), nil, nil); err == nil || err.Error() != `SetFieldValue() column field 'col' required` {
t.Fatalf("unexpected error: %s", err)
}
})
t.Run("ErrColumnFieldValue", func(t *testing.T) {
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(invalid_column_name="bad_column", frame=f, field0=100)`), nil, nil); err == nil || err.Error() != `SetFieldValue() column field 'columnID' required` {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(invalid_column_name="bad_column", frame=f, field0=100)`), nil, nil); err == nil || err.Error() != `SetFieldValue() column field 'col' required` {
t.Fatalf("unexpected error: %s", err)
}
})
t.Run("ErrInvalidFieldValueType", func(t *testing.T) {
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(columnID=10, frame=f, field0="hello")`), nil, nil); err == nil || err.Error() != `invalid field value type` {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetFieldValue(col=10, frame=f, field0="hello")`), nil, nil); err == nil || err.Error() != `invalid field value type` {
t.Fatalf("unexpected error: %s", err)
}
})
@ -419,15 +419,15 @@ func TestExecutor_Execute_TopN(t *testing.T) {
} else if _, err := idx.CreateFrame("other", pilosa.FrameOptions{InverseEnabled: true}); err != nil {
t.Fatal(err)
} else if _, err := e.Execute(context.Background(), "i", test.MustParse(`
SetBit(frame=f, row=0, columnID=0)
SetBit(frame=f, row=0, columnID=1)
SetBit(frame=f, row=0, columnID=`+strconv.Itoa(SliceWidth)+`)
SetBit(frame=f, row=0, columnID=`+strconv.Itoa(SliceWidth+2)+`)
SetBit(frame=f, row=0, columnID=`+strconv.Itoa((5*SliceWidth)+100)+`)
SetBit(frame=f, row=10, columnID=0)
SetBit(frame=f, row=10, columnID=`+strconv.Itoa(SliceWidth)+`)
SetBit(frame=f, row=20, columnID=`+strconv.Itoa(SliceWidth)+`)
SetBit(frame=other, row=0, columnID=0)
SetBit(frame=f, row=0, col=0)
SetBit(frame=f, row=0, col=1)
SetBit(frame=f, row=0, col=`+strconv.Itoa(SliceWidth)+`)
SetBit(frame=f, row=0, col=`+strconv.Itoa(SliceWidth+2)+`)
SetBit(frame=f, row=0, col=`+strconv.Itoa((5*SliceWidth)+100)+`)
SetBit(frame=f, row=10, col=0)
SetBit(frame=f, row=10, col=`+strconv.Itoa(SliceWidth)+`)
SetBit(frame=f, row=20, col=`+strconv.Itoa(SliceWidth)+`)
SetBit(frame=other, row=0, col=0)
`), nil, nil); err != nil {
t.Fatal(err)
}
@ -630,15 +630,15 @@ func TestExecutor_Execute_Sum(t *testing.T) {
}
if _, err := e.Execute(context.Background(), "i", test.MustParse(`
SetBit(frame=f, row=0, columnID=0)
SetBit(frame=f, row=0, columnID=`+strconv.Itoa(SliceWidth+1)+`)
SetBit(frame=f, row=0, col=0)
SetBit(frame=f, row=0, col=`+strconv.Itoa(SliceWidth+1)+`)
SetFieldValue(frame=f, foo=20, bar=2000, columnID=0)
SetFieldValue(frame=f, foo=30, columnID=`+strconv.Itoa(SliceWidth)+`)
SetFieldValue(frame=f, foo=40, columnID=`+strconv.Itoa(SliceWidth+2)+`)
SetFieldValue(frame=f, foo=50, columnID=`+strconv.Itoa((5*SliceWidth)+100)+`)
SetFieldValue(frame=f, foo=60, columnID=`+strconv.Itoa(SliceWidth+1)+`)
SetFieldValue(frame=other, foo=1000, columnID=0)
SetFieldValue(frame=f, foo=20, bar=2000, col=0)
SetFieldValue(frame=f, foo=30, col=`+strconv.Itoa(SliceWidth)+`)
SetFieldValue(frame=f, foo=40, col=`+strconv.Itoa(SliceWidth+2)+`)
SetFieldValue(frame=f, foo=50, col=`+strconv.Itoa((5*SliceWidth)+100)+`)
SetFieldValue(frame=f, foo=60, col=`+strconv.Itoa(SliceWidth+1)+`)
SetFieldValue(frame=other, foo=1000, col=0)
`), nil, nil); err != nil {
t.Fatal(err)
}
@ -679,16 +679,16 @@ func TestExecutor_Execute_Range(t *testing.T) {
// Set bits.
if _, err := e.Execute(context.Background(), "i", test.MustParse(`
SetBit(frame=f, row=1, columnID=2, timestamp="1999-12-31T00:00")
SetBit(frame=f, row=1, columnID=3, timestamp="2000-01-01T00:00")
SetBit(frame=f, row=1, columnID=4, timestamp="2000-01-02T00:00")
SetBit(frame=f, row=1, columnID=5, timestamp="2000-02-01T00:00")
SetBit(frame=f, row=1, columnID=6, timestamp="2001-01-01T00:00")
SetBit(frame=f, row=1, columnID=7, timestamp="2002-01-01T02:00")
SetBit(frame=f, row=1, col=2, timestamp="1999-12-31T00:00")
SetBit(frame=f, row=1, col=3, timestamp="2000-01-01T00:00")
SetBit(frame=f, row=1, col=4, timestamp="2000-01-02T00:00")
SetBit(frame=f, row=1, col=5, timestamp="2000-02-01T00:00")
SetBit(frame=f, row=1, col=6, timestamp="2001-01-01T00:00")
SetBit(frame=f, row=1, col=7, timestamp="2002-01-01T02:00")
SetBit(frame=f, row=1, columnID=2, timestamp="1999-12-30T00:00")
SetBit(frame=f, row=1, columnID=2, timestamp="2002-02-01T00:00")
SetBit(frame=f, row=10, columnID=2, timestamp="2001-01-01T00:00")
SetBit(frame=f, row=1, col=2, timestamp="1999-12-30T00:00")
SetBit(frame=f, row=1, col=2, timestamp="2002-02-01T00:00")
SetBit(frame=f, row=10, col=2, timestamp="2001-01-01T00:00")
`), nil, nil); err != nil {
t.Fatal(err)
}
@ -703,7 +703,7 @@ func TestExecutor_Execute_Range(t *testing.T) {
t.Run("Inverse", func(t *testing.T) {
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
if res, err := e.Execute(context.Background(), "i", test.MustParse(`Range(columnID=2, frame=f, start="1999-01-01T00:00", end="2003-01-01T00:00")`), nil, nil); err != nil {
if res, err := e.Execute(context.Background(), "i", test.MustParse(`Range(col=2, frame=f, start="1999-01-01T00:00", end="2003-01-01T00:00")`), nil, nil); err != nil {
t.Fatal(err)
} else if bits := res[0].(*pilosa.Bitmap).Bits(); !reflect.DeepEqual(bits, []uint64{1, 10}) {
t.Fatalf("unexpected bits: %+v", bits)
@ -751,17 +751,17 @@ func TestExecutor_Execute_FieldRange(t *testing.T) {
}
if _, err := e.Execute(context.Background(), "i", test.MustParse(`
SetBit(frame=f, row=0, columnID=0)
SetBit(frame=f, row=0, columnID=`+strconv.Itoa(SliceWidth+1)+`)
SetBit(frame=f, row=0, col=0)
SetBit(frame=f, row=0, col=`+strconv.Itoa(SliceWidth+1)+`)
SetFieldValue(frame=f, foo=20, bar=2000, columnID=50)
SetFieldValue(frame=f, foo=30, columnID=`+strconv.Itoa(SliceWidth)+`)
SetFieldValue(frame=f, foo=10, columnID=`+strconv.Itoa(SliceWidth+2)+`)
SetFieldValue(frame=f, foo=20, columnID=`+strconv.Itoa((5*SliceWidth)+100)+`)
SetFieldValue(frame=f, foo=60, columnID=`+strconv.Itoa(SliceWidth+1)+`)
SetFieldValue(frame=other, foo=1000, columnID=0)
SetFieldValue(frame=edge, foo=100, columnID=0)
SetFieldValue(frame=edge, foo=-100, columnID=1)
SetFieldValue(frame=f, foo=20, bar=2000, col=50)
SetFieldValue(frame=f, foo=30, col=`+strconv.Itoa(SliceWidth)+`)
SetFieldValue(frame=f, foo=10, col=`+strconv.Itoa(SliceWidth+2)+`)
SetFieldValue(frame=f, foo=20, col=`+strconv.Itoa((5*SliceWidth)+100)+`)
SetFieldValue(frame=f, foo=60, col=`+strconv.Itoa(SliceWidth+1)+`)
SetFieldValue(frame=other, foo=1000, col=0)
SetFieldValue(frame=edge, foo=100, col=0)
SetFieldValue(frame=edge, foo=-100, col=1)
`), nil, nil); err != nil {
t.Fatal(err)
}
@ -994,7 +994,7 @@ func TestExecutor_Execute_Remote_SetBit(t *testing.T) {
s.Handler.Executor.ExecuteFn = func(ctx context.Context, index string, query *pql.Query, slices []uint64, opt *pilosa.ExecOptions) ([]interface{}, error) {
if index != `i` {
t.Fatalf("unexpected index: %s", index)
} else if query.String() != `SetBit(columnID=2, frame="f", row=10)` {
} else if query.String() != `SetBit(col=2, frame="f", row=10)` {
t.Fatalf("unexpected query: %s", query.String())
}
remoteCalled = true
@ -1012,7 +1012,7 @@ func TestExecutor_Execute_Remote_SetBit(t *testing.T) {
}
e := test.NewExecutor(hldr.Holder, c)
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=10, frame=f, columnID=2)`), nil, nil); err != nil {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=10, frame=f, col=2)`), nil, nil); err != nil {
t.Fatal(err)
}
@ -1046,7 +1046,7 @@ func TestExecutor_Execute_Remote_SetBit_With_Timestamp(t *testing.T) {
s.Handler.Executor.ExecuteFn = func(ctx context.Context, index string, query *pql.Query, slices []uint64, opt *pilosa.ExecOptions) ([]interface{}, error) {
if index != `i` {
t.Fatalf("unexpected index: %s", index)
} else if query.String() != `SetBit(columnID=2, frame="f", row=10, timestamp="2016-12-11T10:09")` {
} else if query.String() != `SetBit(col=2, frame="f", row=10, timestamp="2016-12-11T10:09")` {
t.Fatalf("unexpected query: %s", query.String())
}
remoteCalled = true
@ -1066,7 +1066,7 @@ func TestExecutor_Execute_Remote_SetBit_With_Timestamp(t *testing.T) {
}
e := test.NewExecutor(hldr.Holder, c)
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=10, frame=f, columnID=2, timestamp="2016-12-11T10:09")`), nil, nil); err != nil {
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetBit(row=10, frame=f, col=2, timestamp="2016-12-11T10:09")`), nil, nil); err != nil {
t.Fatal(err)
}
@ -1169,11 +1169,11 @@ func TestExectutor_SetColumnAttrs_ExcludeFrame(t *testing.T) {
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
// SetColumnAttrs call should exclude the frame attribute
_, err := e.Execute(context.Background(), "i", test.MustParse("SetBit(frame='f', row=1, columnID=10)"), nil, nil)
_, err := e.Execute(context.Background(), "i", test.MustParse("SetBit(frame='f', row=1, col=10)"), nil, nil)
if err != nil {
t.Fatal(err)
}
_, err = e.Execute(context.Background(), "i", test.MustParse("SetColumnAttrs(frame='f', columnID=10, foo='bar')"), nil, nil)
_, err = e.Execute(context.Background(), "i", test.MustParse("SetColumnAttrs(frame='f', col=10, foo='bar')"), nil, nil)
if err != nil {
t.Fatal(err)
}
@ -1186,11 +1186,11 @@ func TestExectutor_SetColumnAttrs_ExcludeFrame(t *testing.T) {
}
// SetColumnAttrs call should not break if frame is not specified
_, err = e.Execute(context.Background(), "i", test.MustParse("SetBit(frame='f', row=1, columnID=20)"), nil, nil)
_, err = e.Execute(context.Background(), "i", test.MustParse("SetBit(frame='f', row=1, col=20)"), nil, nil)
if err != nil {
t.Fatal(err)
}
_, err = e.Execute(context.Background(), "i", test.MustParse("SetColumnAttrs(columnID=20, foo='bar')"), nil, nil)
_, err = e.Execute(context.Background(), "i", test.MustParse("SetColumnAttrs(col=20, foo='bar')"), nil, nil)
if err != nil {
t.Fatal(err)
}

View file

@ -1841,11 +1841,11 @@ func (s *FragmentSyncer) syncBlock(id int) error {
// Only sync the standard block.
for j := 0; j < len(set.ColumnIDs); j++ {
fmt.Fprintf(&(buffers[count/s.Cluster.MaxWritesPerRequest]), "SetBit(frame=%q, row=%d, columnID=%d)\n", f.Frame(), set.RowIDs[j], (f.Slice()*SliceWidth)+set.ColumnIDs[j])
fmt.Fprintf(&(buffers[count/s.Cluster.MaxWritesPerRequest]), "SetBit(frame=%q, row=%d, col=%d)\n", f.Frame(), set.RowIDs[j], (f.Slice()*SliceWidth)+set.ColumnIDs[j])
count++
}
for j := 0; j < len(clear.ColumnIDs); j++ {
fmt.Fprintf(&(buffers[count/s.Cluster.MaxWritesPerRequest]), "ClearBit(frame=%q, row=%d, columnID=%d)\n", f.Frame(), clear.RowIDs[j], (f.Slice()*SliceWidth)+clear.ColumnIDs[j])
fmt.Fprintf(&(buffers[count/s.Cluster.MaxWritesPerRequest]), "ClearBit(frame=%q, row=%d, col=%d)\n", f.Frame(), clear.RowIDs[j], (f.Slice()*SliceWidth)+clear.ColumnIDs[j])
count++
}

View file

@ -57,7 +57,6 @@ type Frame struct {
Stats StatsClient
// Frame options.
rowLabel string
inverseEnabled bool
cacheType string
cacheSize uint32
@ -267,7 +266,6 @@ func (f *Frame) loadMeta() error {
// Read data from meta file.
buf, err := ioutil.ReadFile(filepath.Join(f.path, ".meta"))
if os.IsNotExist(err) {
f.rowLabel = DefaultRowLabel
f.inverseEnabled = DefaultInverseEnabled
f.cacheType = DefaultCacheType
f.cacheSize = DefaultCacheSize

View file

@ -30,8 +30,7 @@ func TestPostIndexRequestUnmarshalJSON(t *testing.T) {
{json: `{"options": {}}`, expected: postIndexRequest{Options: IndexOptions{}}},
{json: `{"options": 4}`, err: "options is not map[string]interface{}"},
{json: `{"option": {}}`, err: "Unknown key: option:map[]"},
{json: `{"options": {"columnLabel": "test"}}`, expected: postIndexRequest{Options: IndexOptions{ColumnLabel: "test"}}},
{json: `{"options": {"columnLabl": "test"}}`, err: "Unknown key: columnLabl:test"},
{json: `{"options": {"columnLabel": "test"}}`, err: "Unknown key: columnLabel:test"},
}
for _, test := range tests {
actual := &postIndexRequest{}

View file

@ -107,7 +107,7 @@ func TestHandler_Schema(t *testing.T) {
if w.Code != http.StatusOK {
t.Fatalf("unexpected status code: %d", w.Code)
} else if body := w.Body.String(); body != `{"indexes":[{"name":"i0","frames":[{"name":"f0"},{"name":"f1","views":[{"name":"inverse"},{"name":"standard"}]}]},{"name":"i1","frames":[{"name":"f0","views":[{"name":"standard"}]}]}]}`+"\n" {
} else if body := w.Body.String(); body != `{"indexes":[{"name":"i0","frames":[{"name":"f0","options":{"rowLabel":"rowID","cacheType":"ranked","cacheSize":50000}},{"name":"f1","options":{"rowLabel":"rowID","inverseEnabled":true,"cacheType":"ranked","cacheSize":50000},"views":[{"name":"inverse"},{"name":"standard"}]}]},{"name":"i1","frames":[{"name":"f0","options":{"rowLabel":"rowID","cacheType":"ranked","cacheSize":50000},"views":[{"name":"standard"}]}]}]}`+"\n" {
} else if body := w.Body.String(); body != `{"indexes":[{"name":"i0","frames":[{"name":"f0","options":{"cacheType":"ranked","cacheSize":50000}},{"name":"f1","options":{"inverseEnabled":true,"cacheType":"ranked","cacheSize":50000},"views":[{"name":"inverse"},{"name":"standard"}]}]},{"name":"i1","frames":[{"name":"f0","options":{"cacheType":"ranked","cacheSize":50000},"views":[{"name":"standard"}]}]}]}`+"\n" {
t.Fatalf("unexpected body: %s", body)
}
}
@ -1349,7 +1349,7 @@ func TestHandler_DuplicatePrimaryKey(t *testing.T) {
}
// Ensure throwing error if there's no primary key
hldr.MustCreateIndexIfNotExists("i1", pilosa.IndexOptions{ColumnLabel: "id"})
hldr.MustCreateIndexIfNotExists("i1", pilosa.IndexOptions{})
unmatchColumnBody := []byte(`
{
"frames":[{

View file

@ -361,7 +361,6 @@ func (h *Holder) createIndex(name string, opt IndexOptions) (*Index, error) {
}
// Update options.
index.SetColumnLabel(opt.ColumnLabel)
index.SetTimeQuantum(opt.TimeQuantum)
h.indexes[index.Name()] = index

View file

@ -68,7 +68,7 @@ func TestHolder_Open(t *testing.T) {
h := test.MustOpenHolder()
defer h.Close()
if _, err := h.CreateIndex("test", pilosa.IndexOptions{}); err != nil {
if _, err := h.CreateIndex("test", pilosa.IndexOptions{TimeQuantum: pilosa.TimeQuantum("YMDH")}); err != nil {
t.Fatal(err)
} else if err := h.Holder.Close(); err != nil {
t.Fatal(err)

View file

@ -31,7 +31,7 @@ import (
// Default index settings.
const (
DefaultColumnLabel = "columnID"
DefaultColumnLabel = "col"
InputDefinitionDir = ".input-definitions"
)
@ -45,9 +45,6 @@ type Index struct {
// This can be overridden by individual frames.
timeQuantum TimeQuantum
// Label used for referring to columns in index.
columnLabel string
// Frames by name.
frames map[string]*Frame
@ -88,8 +85,6 @@ func NewIndex(path, name string) (*Index, error) {
NewAttrStore: NewNopAttrStore,
columnAttrStore: NopAttrStore,
columnLabel: DefaultColumnLabel,
broadcaster: NopBroadcaster,
Stats: NopStatsClient,
LogOutput: ioutil.Discard,
@ -105,39 +100,6 @@ func (i *Index) Path() string { return i.path }
// ColumnAttrStore returns the storage for column attributes.
func (i *Index) ColumnAttrStore() AttrStore { return i.columnAttrStore }
// SetColumnLabel sets the column label. Persists to meta file on update.
func (i *Index) SetColumnLabel(v string) error {
i.mu.Lock()
defer i.mu.Unlock()
// Ignore if no change occurred.
if v == "" || i.columnLabel == v {
return nil
}
// Make sure columnLabel is valid name
err := ValidateLabel(v)
if err != nil {
return err
}
// Persist meta data to disk on change.
i.columnLabel = v
if err := i.saveMeta(); err != nil {
return err
}
return nil
}
// ColumnLabel returns the column label.
func (i *Index) ColumnLabel() string {
i.mu.RLock()
v := i.columnLabel
i.mu.RUnlock()
return v
}
// Options returns all options for this index.
func (i *Index) Options() IndexOptions {
i.mu.RLock()
@ -147,7 +109,6 @@ func (i *Index) Options() IndexOptions {
func (i *Index) options() IndexOptions {
return IndexOptions{
ColumnLabel: i.columnLabel,
TimeQuantum: i.timeQuantum,
}
}
@ -217,7 +178,6 @@ func (i *Index) loadMeta() error {
buf, err := ioutil.ReadFile(filepath.Join(i.path, ".meta"))
if os.IsNotExist(err) {
i.timeQuantum = ""
i.columnLabel = DefaultColumnLabel
return nil
} else if err != nil {
return err
@ -229,7 +189,6 @@ func (i *Index) loadMeta() error {
// Copy metadata fields.
i.timeQuantum = TimeQuantum(pb.TimeQuantum)
i.columnLabel = pb.ColumnLabel
return nil
}
@ -239,7 +198,6 @@ func (i *Index) saveMeta() error {
// Marshal metadata.
buf, err := proto.Marshal(&internal.IndexMeta{
TimeQuantum: string(i.timeQuantum),
ColumnLabel: i.columnLabel,
})
if err != nil {
return err
@ -631,14 +589,12 @@ func encodeIndex(d *Index) *internal.Index {
// IndexOptions represents options to set when initializing an index.
type IndexOptions struct {
ColumnLabel string `json:"columnLabel,omitempty"`
TimeQuantum TimeQuantum `json:"timeQuantum,omitempty"`
}
// Encode converts i into its internal representation.
func (i *IndexOptions) Encode() *internal.IndexMeta {
return &internal.IndexMeta{
ColumnLabel: i.ColumnLabel,
TimeQuantum: string(i.TimeQuantum),
}
}

View file

@ -281,7 +281,7 @@ func (i *InputDefinitionInfo) Validate() error {
}
}
// Validate columnLabel and duplicate primaryKey.
// Validate duplicate primaryKey.
for _, field := range i.Fields {
if field.Name == "" {
return ErrInputDefinitionNameRequired

View file

@ -68,7 +68,6 @@ var _ = math.Inf
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type IndexMeta struct {
ColumnLabel string `protobuf:"bytes,1,opt,name=ColumnLabel,proto3" json:"ColumnLabel,omitempty"`
TimeQuantum string `protobuf:"bytes,2,opt,name=TimeQuantum,proto3" json:"TimeQuantum,omitempty"`
}
@ -77,13 +76,6 @@ func (m *IndexMeta) String() string { return proto.CompactTextString(
func (*IndexMeta) ProtoMessage() {}
func (*IndexMeta) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{0} }
func (m *IndexMeta) GetColumnLabel() string {
if m != nil {
return m.ColumnLabel
}
return ""
}
func (m *IndexMeta) GetTimeQuantum() string {
if m != nil {
return m.TimeQuantum
@ -1240,12 +1232,6 @@ func (m *IndexMeta) MarshalTo(dAtA []byte) (int, error) {
_ = i
var l int
_ = l
if len(m.ColumnLabel) > 0 {
dAtA[i] = 0xa
i++
i = encodeVarintPrivate(dAtA, i, uint64(len(m.ColumnLabel)))
i += copy(dAtA[i:], m.ColumnLabel)
}
if len(m.TimeQuantum) > 0 {
dAtA[i] = 0x12
i++
@ -2760,10 +2746,6 @@ func encodeVarintPrivate(dAtA []byte, offset int, v uint64) int {
func (m *IndexMeta) Size() (n int) {
var l int
_ = l
l = len(m.ColumnLabel)
if l > 0 {
n += 1 + l + sovPrivate(uint64(l))
}
l = len(m.TimeQuantum)
if l > 0 {
n += 1 + l + sovPrivate(uint64(l))
@ -3457,35 +3439,6 @@ func (m *IndexMeta) Unmarshal(dAtA []byte) error {
return fmt.Errorf("proto: IndexMeta: illegal tag %d (wire type %d)", fieldNum, wire)
}
switch fieldNum {
case 1:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field ColumnLabel", wireType)
}
var stringLen uint64
for shift := uint(0); ; shift += 7 {
if shift >= 64 {
return ErrIntOverflowPrivate
}
if iNdEx >= l {
return io.ErrUnexpectedEOF
}
b := dAtA[iNdEx]
iNdEx++
stringLen |= (uint64(b) & 0x7F) << shift
if b < 0x80 {
break
}
}
intStringLen := int(stringLen)
if intStringLen < 0 {
return ErrInvalidLengthPrivate
}
postIndex := iNdEx + intStringLen
if postIndex > l {
return io.ErrUnexpectedEOF
}
m.ColumnLabel = string(dAtA[iNdEx:postIndex])
iNdEx = postIndex
case 2:
if wireType != 2 {
return fmt.Errorf("proto: wrong wireType = %d for field TimeQuantum", wireType)
@ -8620,88 +8573,87 @@ var (
func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) }
var fileDescriptorPrivate = []byte{
// 1326 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x5d, 0x6f, 0x1b, 0x45,
0x17, 0x7e, 0xd7, 0x6b, 0x3b, 0xf1, 0x71, 0x9d, 0x3a, 0xd3, 0x36, 0xaf, 0x5b, 0x45, 0xae, 0x19,
0x15, 0x1a, 0x2a, 0x11, 0x95, 0x54, 0x42, 0xb4, 0x50, 0xa9, 0xd4, 0x76, 0xd5, 0x85, 0xa6, 0x94,
0x71, 0x5b, 0x24, 0x24, 0x90, 0x26, 0xf6, 0x90, 0xae, 0xb2, 0xde, 0x35, 0xbb, 0xe3, 0x34, 0xee,
0x05, 0x97, 0x08, 0x09, 0x71, 0x8f, 0xb8, 0xe5, 0xcf, 0x70, 0xc9, 0x2f, 0x40, 0xa8, 0xfc, 0x08,
0x2e, 0x41, 0x67, 0x3e, 0x76, 0xd7, 0x5f, 0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32, 0x92, 0xbd, 0x73, 0x4b, 0xb9, 0x77, 0x2e,
0x3d, 0x80, 0x8b, 0x73, 0x69, 0x6a, 0x47, 0xc3, 0x11, 0xd6, 0xc3, 0xbf, 0x48, 0x17, 0x8e, 0x8c,
0x38, 0x36, 0x89, 0xaa, 0x30, 0x2d, 0xd0, 0x9b, 0x70, 0xa1, 0x27, 0x64, 0x2e, 0x49, 0xb6, 0xda,
0x5a, 0xe0, 0x3e, 0x14, 0xcf, 0x97, 0x1c, 0x1f, 0x97, 0xe8, 0x87, 0xd0, 0x78, 0x32, 0x1a, 0x70,
0x29, 0x4e, 0x65, 0x7d, 0x17, 0x56, 0x1f, 0x47, 0xa3, 0x28, 0x88, 0xf6, 0x27, 0x27, 0xb4, 0x7c,
0x03, 0x56, 0xf4, 0x7c, 0xd4, 0x8f, 0x94, 0x0a, 0xb3, 0x22, 0x3d, 0x87, 0x05, 0xdd, 0xe7, 0x41,
0x7f, 0x1c, 0x20, 0x0d, 0xfc, 0xf7, 0x4a, 0xee, 0xd6, 0x7f, 0x7d, 0xd9, 0x74, 0x7e, 0x7b, 0xd9,
0x74, 0xfe, 0x78, 0xd9, 0x74, 0x7e, 0xfa, 0xb3, 0xf9, 0xbf, 0xbd, 0xb2, 0xfa, 0x93, 0xbf, 0xf1,
0x4f, 0x00, 0x00, 0x00, 0xff, 0xff, 0xe2, 0x13, 0x1d, 0x50, 0xda, 0x0f, 0x00, 0x00,
// 1308 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x57, 0x4f, 0x6f, 0x1b, 0x45,
0x14, 0x67, 0xbd, 0xb6, 0x13, 0x3f, 0xd7, 0xa9, 0x33, 0x6d, 0x83, 0x5b, 0x45, 0xae, 0x19, 0x15,
0x1a, 0x2a, 0x35, 0x2a, 0xa9, 0x84, 0x68, 0xa1, 0x52, 0x69, 0xec, 0xaa, 0x0b, 0xa4, 0x2a, 0x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0x03, 0xe7, 0xf2, 0x10, 0x5e, 0x6b, 0x30, 0xd2, 0x8a, 0x14, 0xe6,
0x56, 0xc4, 0x9d, 0x57, 0x91, 0x62, 0x56, 0x91, 0xec, 0x9d, 0x5b, 0xca, 0xbd, 0x73, 0xe9, 0x1e,
0x5c, 0x9e, 0x29, 0xd3, 0x76, 0x34, 0x18, 0xaa, 0x7e, 0xf8, 0x0f, 0xe5, 0x52, 0x2b, 0x23, 0x8e,
0x4d, 0xa1, 0x2a, 0x4c, 0x13, 0xf4, 0x0e, 0x5c, 0xea, 0x0a, 0x99, 0x2b, 0x92, 0xed, 0xb6, 0x16,
0xb8, 0x8f, 0xc5, 0xc1, 0x82, 0xe3, 0x2b, 0x11, 0xfd, 0x08, 0x1a, 0xcf, 0x86, 0x7d, 0x2e, 0xc5,
0x99, 0xac, 0x1f, 0xc0, 0xf2, 0xd3, 0x68, 0x18, 0x05, 0xd1, 0xee, 0xf8, 0x84, 0x91, 0x6f, 0xc0,
0x92, 0xde, 0x8f, 0xfa, 0x91, 0x52, 0x61, 0x96, 0xa4, 0x17, 0x54, 0x43, 0xf7, 0x78, 0xd0, 0x1b,
0x05, 0x0a, 0x86, 0xfa, 0xf7, 0x4a, 0x1e, 0xd4, 0x7f, 0x3b, 0x6a, 0x3a, 0xbf, 0x1f, 0x35, 0x9d,
0x3f, 0x8f, 0x9a, 0xce, 0xcf, 0x7f, 0x35, 0xdf, 0x78, 0x51, 0xc6, 0xff, 0xf4, 0xdb, 0xff, 0x06,
0x00, 0x00, 0xff, 0xff, 0xda, 0x68, 0xc4, 0x54, 0xb8, 0x0f, 0x00, 0x00,
}

View file

@ -3,7 +3,6 @@ syntax = "proto3";
package internal;
message IndexMeta {
string ColumnLabel = 1;
string TimeQuantum = 2;
}

View file

@ -40,7 +40,6 @@ var (
ErrInputDefinitionExists = errors.New("input-definition already exists")
ErrInputDefinitionHasPrimaryKey = errors.New("input-definition must contain one PrimaryKey")
ErrInputDefinitionDupePrimaryKey = errors.New("input-definition can only contain one PrimaryKey")
ErrInputDefinitionColumnLabel = errors.New("PrimaryKey field name does not match columnLabel")
ErrInputDefinitionNameRequired = errors.New("input-definition name required")
ErrInputDefinitionAttrsRequired = errors.New("frames and fields are required")
ErrInputDefinitionValueMap = errors.New("valueMap required for map")

View file

@ -378,7 +378,6 @@ func (s *Server) ReceiveMessage(pb proto.Message) error {
}
case *internal.CreateIndexMessage:
opt := IndexOptions{
ColumnLabel: obj.Meta.ColumnLabel,
TimeQuantum: TimeQuantum(obj.Meta.TimeQuantum),
}
_, err := s.Holder.CreateIndex(obj.Index, opt)

View file

@ -153,8 +153,8 @@ func TestMain_SendReceiveMessage(t *testing.T) {
// Write data on first node.
if _, err := m0.Query("i", "", `
SetBit(row=1, frame="f", columnID=1)
SetBit(row=1, frame="f", columnID=2400000)
SetBit(row=1, frame="f", col=1)
SetBit(row=1, frame="f", col=2400000)
`); err != nil {
t.Fatal(err)
}
@ -187,7 +187,7 @@ func TestMain_SendReceiveMessage(t *testing.T) {
"cacheType": "ranked",
"timeQuantum": "YMD"
}}],
"fields": [{"name": "columnID",
"fields": [{"name": "col",
"primaryKey": true
}]}
`); err != nil {
@ -351,8 +351,8 @@ func TestClusterResize_AddNode(t *testing.T) {
// Write data on first node.
if _, err := m0.Query("i", "", `
SetBit(row=1, frame="f", columnID=1)
SetBit(row=1, frame="f", columnID=1300000)
SetBit(row=1, frame="f", col=1)
SetBit(row=1, frame="f", col=1300000)
`); err != nil {
t.Fatal(err)
}
@ -406,8 +406,8 @@ func TestClusterResize_AddNode(t *testing.T) {
// Write data on first node. Note that no data is placed on slice 1.
if _, err := m0.Query("i", "", `
SetBit(row=1, frame="f", columnID=1)
SetBit(row=1, frame="f", columnID=2400000)
SetBit(row=1, frame="f", col=1)
SetBit(row=1, frame="f", col=2400000)
`); err != nil {
t.Fatal(err)
}
@ -560,7 +560,7 @@ func TestClusterResize_RemoveNode(t *testing.T) {
// TODO: Deterministic node IDs would ensure consistent results
setBits := ""
for i := 0; i < 20; i++ {
setBits += fmt.Sprintf("SetBit(row=1, frame=\"f\", columnID=%d) ", i*pilosa.SliceWidth)
setBits += fmt.Sprintf("SetBit(row=1, frame=\"f\", col=%d) ", i*pilosa.SliceWidth)
}
if _, err := m0.Query("i", "", setBits); err != nil {

View file

@ -56,7 +56,7 @@ func TestMain_Set_Quick(t *testing.T) {
if err := client.CreateFrame(context.Background(), "i", cmd.Frame, pilosa.FrameOptions{}); err != nil && err != pilosa.ErrFrameExists {
t.Fatal(err)
}
if _, err := m.Query("i", "", fmt.Sprintf(`SetBit(row=%d, frame=%q, columnID=%d)`, cmd.ID, cmd.Frame, cmd.ColumnID)); err != nil {
if _, err := m.Query("i", "", fmt.Sprintf(`SetBit(row=%d, frame=%q, col=%d)`, cmd.ID, cmd.Frame, cmd.ColumnID)); err != nil {
t.Fatal(err)
}
}
@ -131,13 +131,13 @@ func TestMain_SetRowAttrs(t *testing.T) {
}
// Set bits on different rows in different frames.
if _, err := m.Query("i", "", `SetBit(row=1, frame="x", columnID=100)`); err != nil {
if _, err := m.Query("i", "", `SetBit(row=1, frame="x", col=100)`); err != nil {
t.Fatal(err)
} else if _, err := m.Query("i", "", `SetBit(row=2, frame="x", columnID=100)`); err != nil {
} else if _, err := m.Query("i", "", `SetBit(row=2, frame="x", col=100)`); err != nil {
t.Fatal(err)
} else if _, err := m.Query("i", "", `SetBit(row=2, frame="z", columnID=100)`); err != nil {
} else if _, err := m.Query("i", "", `SetBit(row=2, frame="z", col=100)`); err != nil {
t.Fatal(err)
} else if _, err := m.Query("i", "", `SetBit(row=3, frame="neg", columnID=100)`); err != nil {
} else if _, err := m.Query("i", "", `SetBit(row=3, frame="neg", col=100)`); err != nil {
t.Fatal(err)
}
@ -204,14 +204,14 @@ func TestMain_SetColumnAttrs(t *testing.T) {
}
// Set bits on row.
if _, err := m.Query("i", "", `SetBit(row=1, frame="x", columnID=100)`); err != nil {
if _, err := m.Query("i", "", `SetBit(row=1, frame="x", col=100)`); err != nil {
t.Fatal(err)
} else if _, err := m.Query("i", "", `SetBit(row=1, frame="x", columnID=101)`); err != nil {
} else if _, err := m.Query("i", "", `SetBit(row=1, frame="x", col=101)`); err != nil {
t.Fatal(err)
}
// Set column attributes.
if _, err := m.Query("i", "", `SetColumnAttrs(id=100, foo="bar")`); err != nil {
if _, err := m.Query("i", "", `SetColumnAttrs(col=100, foo="bar")`); err != nil {
t.Fatal(err)
}
@ -234,40 +234,6 @@ func TestMain_SetColumnAttrs(t *testing.T) {
}
}
// Ensure program can set column attributes with columnLabel option.
func TestMain_SetColumnAttrsWithColumnOption(t *testing.T) {
m := test.MustRunMain()
defer m.Close()
// Create frames.
client := m.Client()
if err := client.CreateIndex(context.Background(), "i", pilosa.IndexOptions{ColumnLabel: "col"}); err != nil && err != pilosa.ErrIndexExists {
t.Fatal(err)
} else if err := client.CreateFrame(context.Background(), "i", "x", pilosa.FrameOptions{}); err != nil {
t.Fatal(err)
}
// Set bits on row.
if _, err := m.Query("i", "", `SetBit(row=1, frame="x", col=100)`); err != nil {
t.Fatal(err)
} else if _, err := m.Query("i", "", `SetBit(row=1, frame="x", col=101)`); err != nil {
t.Fatal(err)
}
// Set column attributes.
if _, err := m.Query("i", "", `SetColumnAttrs(col=100, foo="bar")`); err != nil {
t.Fatal(err)
}
// Query row.
if res, err := m.Query("i", "columnAttrs=true", `Bitmap(row=1, frame="x")`); err != nil {
t.Fatal(err)
} else if res != `{"results":[{"attrs":{},"bits":[100,101]}],"columnAttrs":[{"id":100,"attrs":{"foo":"bar"}}]}`+"\n" {
t.Fatalf("unexpected result: %s", res)
}
}
// Ensure program can set bits on one cluster and then restore to a second cluster.
func TestMain_FrameRestore(t *testing.T) {
mains1 := test.MustRunMainWithCluster(t, 2)
@ -285,13 +251,13 @@ func TestMain_FrameRestore(t *testing.T) {
// Write data on first cluster.
if _, err := m10.Query("i", "", `
SetBit(row=1, frame="f", columnID=100)
SetBit(row=1, frame="f", columnID=1000)
SetBit(row=1, frame="f", columnID=100000)
SetBit(row=1, frame="f", columnID=200000)
SetBit(row=1, frame="f", columnID=400000)
SetBit(row=1, frame="f", columnID=600000)
SetBit(row=1, frame="f", columnID=800000)
SetBit(row=1, frame="f", col=100)
SetBit(row=1, frame="f", col=1000)
SetBit(row=1, frame="f", col=100000)
SetBit(row=1, frame="f", col=200000)
SetBit(row=1, frame="f", col=400000)
SetBit(row=1, frame="f", col=600000)
SetBit(row=1, frame="f", col=800000)
`); err != nil {
t.Fatal("setting bits:", err)
}
@ -401,7 +367,7 @@ func TestMain_RecalculateHashes(t *testing.T) {
data := []string{}
for rowID := 1; rowID < 10; rowID++ {
for columnID := 1; columnID < 100; columnID++ {
data = append(data, fmt.Sprintf(`SetBit(row=%d, frame="f", columnID=%d)`, rowID, columnID))
data = append(data, fmt.Sprintf(`SetBit(row=%d, frame="f", col=%d)`, rowID, columnID))
}
}
if _, err := cluster[0].Query("i", "", strings.Join(data, "")); err != nil {

View file

@ -206,7 +206,7 @@ func TestStatsCount_SetProfileAttrs(t *testing.T) {
return
},
}
if _, err := e.Execute(context.Background(), "d", test.MustParse(`SetColumnAttrs(id=10, frame=f, foo="bar")`), nil, nil); err != nil {
if _, err := e.Execute(context.Background(), "d", test.MustParse(`SetColumnAttrs(col=10, frame=f, foo="bar")`), nil, nil); err != nil {
t.Fatal(err)
}
if !called {