mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-10-10 12:57:54 +00:00
Merge pull request #1357 from travisturner/rename-field-part-two
More renaming and removal of Field
This commit is contained in:
commit
2680c00dc9
20 changed files with 319 additions and 928 deletions
69
api.go
69
api.go
|
|
@ -488,67 +488,6 @@ func (api *API) Schema(ctx context.Context) []*IndexInfo {
|
|||
return api.Holder.Schema()
|
||||
}
|
||||
|
||||
// CreateField creates a new BSI field in the given index and frame.
|
||||
func (api *API) CreateField(ctx context.Context, indexName string, frameName string, bsig *bsiGroup) error {
|
||||
if err := api.validate(apiCreateField); err != nil {
|
||||
return errors.Wrap(err, "validating api method")
|
||||
}
|
||||
|
||||
// Retrieve frame by name.
|
||||
f := api.Holder.Frame(indexName, frameName)
|
||||
if f == nil {
|
||||
return ErrFrameNotFound
|
||||
}
|
||||
|
||||
// Create new bsiGroup.
|
||||
if err := f.createBSIGroup(bsig); err != nil {
|
||||
return errors.Wrap(err, "creating bsigroup")
|
||||
}
|
||||
|
||||
// Send the create bsigroup message to all nodes.
|
||||
err := api.Broadcaster.SendSync(
|
||||
&internal.CreateBSIGroupMessage{
|
||||
Index: indexName,
|
||||
Frame: frameName,
|
||||
BSIGroup: encodeBSIGroup(bsig),
|
||||
})
|
||||
if err != nil {
|
||||
api.Logger.Printf("problem sending CreateField message: %s", err)
|
||||
}
|
||||
return errors.Wrap(err, "sending CreateField message")
|
||||
}
|
||||
|
||||
// TODO: remove this from the API
|
||||
// DeleteField deletes the given field.
|
||||
func (api *API) DeleteField(ctx context.Context, indexName string, frameName string, fieldName string) error {
|
||||
if err := api.validate(apiDeleteField); err != nil {
|
||||
return errors.Wrap(err, "validating api method")
|
||||
}
|
||||
|
||||
// Retrieve frame by name.
|
||||
f := api.Holder.Frame(indexName, frameName)
|
||||
if f == nil {
|
||||
return ErrFrameNotFound
|
||||
}
|
||||
|
||||
// Delete field.
|
||||
if err := f.deleteBSIGroupAndView(fieldName); err != nil {
|
||||
return errors.Wrap(err, "deleting field")
|
||||
}
|
||||
|
||||
// Send the delete field message to all nodes.
|
||||
err := api.Broadcaster.SendSync(
|
||||
&internal.DeleteBSIGroupMessage{
|
||||
Index: indexName,
|
||||
Frame: frameName,
|
||||
BSIGroup: fieldName,
|
||||
})
|
||||
if err != nil {
|
||||
api.Logger.Printf("problem sending DeleteField message: %s", err)
|
||||
}
|
||||
return errors.Wrap(err, "sending DeleteField message")
|
||||
}
|
||||
|
||||
// Views returns the views in the given frame.
|
||||
func (api *API) Views(ctx context.Context, indexName string, frameName string) ([]*View, error) {
|
||||
if err := api.validate(apiViews); err != nil {
|
||||
|
|
@ -710,9 +649,9 @@ func (api *API) ImportValue(ctx context.Context, req internal.ImportValueRequest
|
|||
}
|
||||
|
||||
// Import into fragment.
|
||||
err = frame.ImportValue(req.Field, req.ColumnIDs, req.Values)
|
||||
err = frame.ImportValue(req.ColumnIDs, req.Values)
|
||||
if err != nil {
|
||||
api.Logger.Printf("import error: index=%s, frame=%s, slice=%d, field=%s, columns=%d, err=%s", req.Index, req.Frame, req.Slice, req.Field, len(req.ColumnIDs), err)
|
||||
api.Logger.Printf("import error: index=%s, frame=%s, slice=%d, columns=%d, err=%s", req.Index, req.Frame, req.Slice, len(req.ColumnIDs), err)
|
||||
}
|
||||
return errors.Wrap(err, "importing")
|
||||
}
|
||||
|
|
@ -851,10 +790,8 @@ type apiMethod int
|
|||
// API validation constants.
|
||||
const (
|
||||
apiClusterMessage apiMethod = iota
|
||||
apiCreateField
|
||||
apiCreateFrame
|
||||
apiCreateIndex
|
||||
apiDeleteField
|
||||
apiDeleteFrame
|
||||
apiDeleteIndex
|
||||
apiDeleteView
|
||||
|
|
@ -896,10 +833,8 @@ var methodsResizing = map[apiMethod]struct{}{
|
|||
}
|
||||
|
||||
var methodsNormal = map[apiMethod]struct{}{
|
||||
apiCreateField: struct{}{},
|
||||
apiCreateFrame: struct{}{},
|
||||
apiCreateIndex: struct{}{},
|
||||
apiDeleteField: struct{}{},
|
||||
apiDeleteFrame: struct{}{},
|
||||
apiDeleteIndex: struct{}{},
|
||||
apiDeleteView: struct{}{},
|
||||
|
|
|
|||
|
|
@ -4,9 +4,9 @@ package pilosa
|
|||
|
||||
import "fmt"
|
||||
|
||||
const _apiMethod_name = "apiClusterMessageapiCreateFieldapiCreateFrameapiCreateIndexapiDeleteFieldapiDeleteFrameapiDeleteIndexapiDeleteViewapiExportCSVapiFragmentBlockDataapiFragmentBlocksapiFrameAttrDiffapiImportapiImportValueapiIndexapiIndexAttrDiffapiMarshalFragmentapiQueryapiRecalculateCachesapiRemoveNodeapiResizeAbortapiSetCoordinatorapiSliceNodesapiUnmarshalFragmentapiViews"
|
||||
const _apiMethod_name = "apiClusterMessageapiCreateFrameapiCreateIndexapiDeleteFrameapiDeleteIndexapiDeleteViewapiExportCSVapiFragmentBlockDataapiFragmentBlocksapiFrameAttrDiffapiImportapiImportValueapiIndexapiIndexAttrDiffapiMarshalFragmentapiQueryapiRecalculateCachesapiRemoveNodeapiResizeAbortapiSetCoordinatorapiSliceNodesapiUnmarshalFragmentapiViews"
|
||||
|
||||
var _apiMethod_index = [...]uint16{0, 17, 31, 45, 59, 73, 87, 101, 114, 126, 146, 163, 179, 188, 202, 210, 226, 244, 252, 272, 285, 299, 316, 329, 349, 357}
|
||||
var _apiMethod_index = [...]uint16{0, 17, 31, 45, 59, 73, 86, 98, 118, 135, 151, 160, 174, 182, 198, 216, 224, 244, 257, 271, 288, 301, 321, 329}
|
||||
|
||||
func (i apiMethod) String() string {
|
||||
if i < 0 || i >= apiMethod(len(_apiMethod_index)-1) {
|
||||
|
|
|
|||
10
broadcast.go
10
broadcast.go
|
|
@ -127,8 +127,6 @@ const (
|
|||
MessageTypeDeleteFrame
|
||||
MessageTypeCreateView
|
||||
MessageTypeDeleteView
|
||||
MessageTypeCreateBSIGroup
|
||||
MessageTypeDeleteBSIGroup
|
||||
MessageTypeClusterStatus
|
||||
MessageTypeResizeInstruction
|
||||
MessageTypeResizeInstructionComplete
|
||||
|
|
@ -157,10 +155,6 @@ func MarshalMessage(m proto.Message) ([]byte, error) {
|
|||
typ = MessageTypeCreateView
|
||||
case *internal.DeleteViewMessage:
|
||||
typ = MessageTypeDeleteView
|
||||
case *internal.CreateBSIGroupMessage:
|
||||
typ = MessageTypeCreateBSIGroup
|
||||
case *internal.DeleteBSIGroupMessage:
|
||||
typ = MessageTypeDeleteBSIGroup
|
||||
case *internal.ClusterStatus:
|
||||
typ = MessageTypeClusterStatus
|
||||
case *internal.ResizeInstruction:
|
||||
|
|
@ -207,10 +201,6 @@ func UnmarshalMessage(buf []byte) (proto.Message, error) {
|
|||
m = &internal.CreateViewMessage{}
|
||||
case MessageTypeDeleteView:
|
||||
m = &internal.DeleteViewMessage{}
|
||||
case MessageTypeCreateBSIGroup:
|
||||
m = &internal.CreateBSIGroupMessage{}
|
||||
case MessageTypeDeleteBSIGroup:
|
||||
m = &internal.DeleteBSIGroupMessage{}
|
||||
case MessageTypeClusterStatus:
|
||||
m = &internal.ClusterStatus{}
|
||||
case MessageTypeResizeInstruction:
|
||||
|
|
|
|||
|
|
@ -420,14 +420,14 @@ func (c *InternalHTTPClient) importNode(ctx context.Context, node *Node, buf []b
|
|||
}
|
||||
|
||||
// ImportValue bulk imports field values for a single slice to a host.
|
||||
func (c *InternalHTTPClient) ImportValue(ctx context.Context, index, frame, field string, slice uint64, vals []FieldValue) error {
|
||||
func (c *InternalHTTPClient) ImportValue(ctx context.Context, index, frame string, slice uint64, vals []FieldValue) error {
|
||||
if index == "" {
|
||||
return ErrIndexRequired
|
||||
} else if frame == "" {
|
||||
return ErrFrameRequired
|
||||
}
|
||||
|
||||
buf, err := marshalImportValuePayload(index, frame, field, slice, vals)
|
||||
buf, err := marshalImportValuePayload(index, frame, slice, vals)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Error Creating Payload: %s", err)
|
||||
}
|
||||
|
|
@ -449,7 +449,7 @@ func (c *InternalHTTPClient) ImportValue(ctx context.Context, index, frame, fiel
|
|||
}
|
||||
|
||||
// marshalImportValuePayload marshalls the import parameters into a protobuf byte slice.
|
||||
func marshalImportValuePayload(index, frame, field string, slice uint64, vals []FieldValue) ([]byte, error) {
|
||||
func marshalImportValuePayload(index, frame string, slice uint64, vals []FieldValue) ([]byte, error) {
|
||||
// Separate row and column IDs to reduce allocations.
|
||||
columnIDs := FieldValues(vals).ColumnIDs()
|
||||
values := FieldValues(vals).Values()
|
||||
|
|
@ -459,7 +459,6 @@ func marshalImportValuePayload(index, frame, field string, slice uint64, vals []
|
|||
Index: index,
|
||||
Frame: frame,
|
||||
Slice: slice,
|
||||
Field: field,
|
||||
ColumnIDs: columnIDs,
|
||||
Values: values,
|
||||
})
|
||||
|
|
@ -1058,7 +1057,7 @@ type InternalClient interface {
|
|||
ImportK(ctx context.Context, index, frame string, bits []Bit) error
|
||||
EnsureIndex(ctx context.Context, name string, options IndexOptions) error
|
||||
EnsureFrame(ctx context.Context, indexName string, frameName string, options FrameOptions) error
|
||||
ImportValue(ctx context.Context, index, frame, field string, slice uint64, vals []FieldValue) error
|
||||
ImportValue(ctx context.Context, index, frame string, slice uint64, vals []FieldValue) error
|
||||
ExportCSV(ctx context.Context, index, frame string, slice uint64, w io.Writer) error
|
||||
CreateFrame(ctx context.Context, index, frame string, opt FrameOptions) error
|
||||
FragmentBlocks(ctx context.Context, index, frame string, slice uint64) ([]FragmentBlock, error)
|
||||
|
|
|
|||
|
|
@ -267,7 +267,7 @@ func TestClient_ImportValue(t *testing.T) {
|
|||
|
||||
// Send import request.
|
||||
c := test.MustNewClient(s.Host(), defaultClient)
|
||||
if err := c.ImportValue(context.Background(), "i", "f", fldName, 0, []pilosa.FieldValue{
|
||||
if err := c.ImportValue(context.Background(), "i", "f", 0, []pilosa.FieldValue{
|
||||
{ColumnID: 1, Value: -10},
|
||||
{ColumnID: 2, Value: 20},
|
||||
{ColumnID: 3, Value: 40},
|
||||
|
|
|
|||
|
|
@ -435,7 +435,7 @@ func (cmd *ImportCommand) importFieldValues(ctx context.Context, vals []pilosa.F
|
|||
}
|
||||
|
||||
logger.Printf("importing slice: %d, n=%d", slice, len(vals))
|
||||
if err := cmd.Client.ImportValue(ctx, cmd.Index, cmd.Frame, cmd.Field, slice, vals); err != nil {
|
||||
if err := cmd.Client.ImportValue(ctx, cmd.Index, cmd.Frame, slice, vals); err != nil {
|
||||
return errors.Wrap(err, "importing values")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
66
executor.go
66
executor.go
|
|
@ -127,10 +127,10 @@ func (e *Executor) executeCall(ctx context.Context, index string, c *pql.Call, s
|
|||
return e.executeSum(ctx, index, c, slices, opt)
|
||||
case "Min":
|
||||
e.Holder.Stats.CountWithCustomTags(c.Name, 1, 1.0, []string{indexTag})
|
||||
return e.executeFieldMin(ctx, index, c, slices, opt)
|
||||
return e.executeMin(ctx, index, c, slices, opt)
|
||||
case "Max":
|
||||
e.Holder.Stats.CountWithCustomTags(c.Name, 1, 1.0, []string{indexTag})
|
||||
return e.executeFieldMax(ctx, index, c, slices, opt)
|
||||
return e.executeMax(ctx, index, c, slices, opt)
|
||||
case "ClearBit":
|
||||
return e.executeClearBit(ctx, index, c, opt)
|
||||
case "Count":
|
||||
|
|
@ -207,8 +207,8 @@ func (e *Executor) executeSum(ctx context.Context, index string, c *pql.Call, sl
|
|||
return other, nil
|
||||
}
|
||||
|
||||
// executeFieldMin executes a Min() call.
|
||||
func (e *Executor) executeFieldMin(ctx context.Context, index string, c *pql.Call, slices []uint64, opt *ExecOptions) (ValCount, error) {
|
||||
// executeMin executes a Min() call.
|
||||
func (e *Executor) executeMin(ctx context.Context, index string, c *pql.Call, slices []uint64, opt *ExecOptions) (ValCount, error) {
|
||||
if frame := c.Args["frame"]; frame == "" {
|
||||
return ValCount{}, errors.New("Min(): frame required")
|
||||
} else if field := c.Args["field"]; field == "" {
|
||||
|
|
@ -221,7 +221,7 @@ func (e *Executor) executeFieldMin(ctx context.Context, index string, c *pql.Cal
|
|||
|
||||
// Execute calls in bulk on each remote node and merge.
|
||||
mapFn := func(slice uint64) (interface{}, error) {
|
||||
return e.executeFieldMinSlice(ctx, index, c, slice)
|
||||
return e.executeMinSlice(ctx, index, c, slice)
|
||||
}
|
||||
|
||||
// Merge returned results at coordinating node.
|
||||
|
|
@ -242,8 +242,8 @@ func (e *Executor) executeFieldMin(ctx context.Context, index string, c *pql.Cal
|
|||
return other, nil
|
||||
}
|
||||
|
||||
// executeFieldMax executes a Max() call.
|
||||
func (e *Executor) executeFieldMax(ctx context.Context, index string, c *pql.Call, slices []uint64, opt *ExecOptions) (ValCount, error) {
|
||||
// executeMax executes a Max() call.
|
||||
func (e *Executor) executeMax(ctx context.Context, index string, c *pql.Call, slices []uint64, opt *ExecOptions) (ValCount, error) {
|
||||
if frame := c.Args["frame"]; frame == "" {
|
||||
return ValCount{}, errors.New("Max(): frame required")
|
||||
} else if field := c.Args["field"]; field == "" {
|
||||
|
|
@ -256,7 +256,7 @@ func (e *Executor) executeFieldMax(ctx context.Context, index string, c *pql.Cal
|
|||
|
||||
// Execute calls in bulk on each remote node and merge.
|
||||
mapFn := func(slice uint64) (interface{}, error) {
|
||||
return e.executeFieldMaxSlice(ctx, index, c, slice)
|
||||
return e.executeMaxSlice(ctx, index, c, slice)
|
||||
}
|
||||
|
||||
// Merge returned results at coordinating node.
|
||||
|
|
@ -391,7 +391,7 @@ func (e *Executor) executeSumCountSlice(ctx context.Context, index string, c *pq
|
|||
return ValCount{}, nil
|
||||
}
|
||||
|
||||
vsum, vcount, err := fragment.FieldSum(filter, field.BitDepth())
|
||||
vsum, vcount, err := fragment.Sum(filter, field.BitDepth())
|
||||
if err != nil {
|
||||
return ValCount{}, errors.Wrap(err, "computing sum")
|
||||
}
|
||||
|
|
@ -401,8 +401,8 @@ func (e *Executor) executeSumCountSlice(ctx context.Context, index string, c *pq
|
|||
}, nil
|
||||
}
|
||||
|
||||
// executeFieldMinSlice calculates the min for fields on a slice.
|
||||
func (e *Executor) executeFieldMinSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (ValCount, error) {
|
||||
// executeMinSlice calculates the min for fields on a slice.
|
||||
func (e *Executor) executeMinSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (ValCount, error) {
|
||||
var filter *Row
|
||||
if len(c.Children) == 1 {
|
||||
row, err := e.executeBitmapCallSlice(ctx, index, c.Children[0], slice)
|
||||
|
|
@ -430,7 +430,7 @@ func (e *Executor) executeFieldMinSlice(ctx context.Context, index string, c *pq
|
|||
return ValCount{}, nil
|
||||
}
|
||||
|
||||
fmin, fcount, err := fragment.FieldMin(filter, field.BitDepth())
|
||||
fmin, fcount, err := fragment.Min(filter, field.BitDepth())
|
||||
if err != nil {
|
||||
return ValCount{}, err
|
||||
}
|
||||
|
|
@ -440,8 +440,8 @@ func (e *Executor) executeFieldMinSlice(ctx context.Context, index string, c *pq
|
|||
}, nil
|
||||
}
|
||||
|
||||
// executeFieldMaxSlice calculates the max for fields on a slice.
|
||||
func (e *Executor) executeFieldMaxSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (ValCount, error) {
|
||||
// executeMaxSlice calculates the max for fields on a slice.
|
||||
func (e *Executor) executeMaxSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (ValCount, error) {
|
||||
var filter *Row
|
||||
if len(c.Children) == 1 {
|
||||
row, err := e.executeBitmapCallSlice(ctx, index, c.Children[0], slice)
|
||||
|
|
@ -469,7 +469,7 @@ func (e *Executor) executeFieldMaxSlice(ctx context.Context, index string, c *pq
|
|||
return ValCount{}, nil
|
||||
}
|
||||
|
||||
fmax, fcount, err := fragment.FieldMax(filter, field.BitDepth())
|
||||
fmax, fcount, err := fragment.Max(filter, field.BitDepth())
|
||||
if err != nil {
|
||||
return ValCount{}, err
|
||||
}
|
||||
|
|
@ -552,7 +552,7 @@ func (e *Executor) executeTopNSlice(ctx context.Context, index string, c *pql.Ca
|
|||
if err != nil {
|
||||
return nil, fmt.Errorf("executeTopNSlice: %v", err)
|
||||
}
|
||||
field, _ := c.Args["field"].(string)
|
||||
field, _ := c.Args["field"].(string) // TODO: rename this to something other than field
|
||||
rowIDs, _, err := c.UintSliceArg("ids")
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("executeTopNSlice: %v", err)
|
||||
|
|
@ -600,7 +600,7 @@ func (e *Executor) executeTopNSlice(ctx context.Context, index string, c *pql.Ca
|
|||
N: int(n),
|
||||
Src: src,
|
||||
RowIDs: rowIDs,
|
||||
FilterField: field,
|
||||
FilterName: field,
|
||||
FilterValues: filters,
|
||||
MinThreshold: minThreshold,
|
||||
TanimotoThreshold: tanimotoThreshold,
|
||||
|
|
@ -687,7 +687,7 @@ func (e *Executor) executeIntersectSlice(ctx context.Context, index string, c *p
|
|||
func (e *Executor) executeRangeSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (*Row, error) {
|
||||
// Handle field ranges differently.
|
||||
if c.HasConditionArg() {
|
||||
return e.executeFieldRangeSlice(ctx, index, c, slice)
|
||||
return e.executeBSIGroupRangeSlice(ctx, index, c, slice)
|
||||
}
|
||||
|
||||
// Parse frame, use default if unset.
|
||||
|
|
@ -756,8 +756,8 @@ func (e *Executor) executeRangeSlice(ctx context.Context, index string, c *pql.C
|
|||
return row, nil
|
||||
}
|
||||
|
||||
// executeFieldRangeSlice executes a range(field) call for a local slice.
|
||||
func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (*Row, error) {
|
||||
// executeBSIGroupRangeSlice executes a range(field) call for a local slice.
|
||||
func (e *Executor) executeBSIGroupRangeSlice(ctx context.Context, index string, c *pql.Call, slice uint64) (*Row, error) {
|
||||
// Parse frame, use default if unset.
|
||||
frame, _ := c.Args["frame"].(string)
|
||||
if frame == "" {
|
||||
|
|
@ -790,12 +790,12 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c *
|
|||
fieldName, cond = k, vv
|
||||
}
|
||||
|
||||
// EQ null (not implemented: flip frag.FieldNotNull with max ColumnID)
|
||||
// NEQ null frag.FieldNotNull()
|
||||
// BETWEEN a,b(in) BETWEEN/frag.FieldRangeBetween()
|
||||
// BETWEEN a,b(out) BETWEEN/frag.FieldNotNull()
|
||||
// EQ <int> frag.FieldRange
|
||||
// NEQ <int> frag.FieldRange
|
||||
// EQ null (not implemented: flip frag.NotNull with max ColumnID)
|
||||
// NEQ null frag.NotNull()
|
||||
// BETWEEN a,b(in) BETWEEN/frag.RangeBetween()
|
||||
// BETWEEN a,b(out) BETWEEN/frag.NotNull()
|
||||
// EQ <int> frag.RangeOp
|
||||
// NEQ <int> frag.RangeOp
|
||||
|
||||
// Handle `!= null`.
|
||||
if cond.Op == pql.NEQ && cond.Value == nil {
|
||||
|
|
@ -811,7 +811,7 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c *
|
|||
return NewRow(), nil
|
||||
}
|
||||
|
||||
return frag.FieldNotNull(field.BitDepth())
|
||||
return frag.NotNull(field.BitDepth())
|
||||
|
||||
} else if cond.Op == pql.BETWEEN {
|
||||
|
||||
|
|
@ -826,7 +826,7 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c *
|
|||
}
|
||||
|
||||
// The reason we don't just call:
|
||||
// return f.FieldRangeBetween(fieldName, predicates[0], predicates[1])
|
||||
// return f.RangeBetween(fieldName, predicates[0], predicates[1])
|
||||
// here is because we need the call to be slice-specific.
|
||||
|
||||
// Find field.
|
||||
|
|
@ -849,10 +849,10 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c *
|
|||
// If the query is asking for the entire valid range, just return
|
||||
// the not-null bitmap for the field.
|
||||
if predicates[0] <= field.Min && predicates[1] >= field.Max {
|
||||
return frag.FieldNotNull(field.BitDepth())
|
||||
return frag.NotNull(field.BitDepth())
|
||||
}
|
||||
|
||||
return frag.FieldRangeBetween(field.BitDepth(), baseValueMin, baseValueMax)
|
||||
return frag.RangeBetween(field.BitDepth(), baseValueMin, baseValueMax)
|
||||
|
||||
} else {
|
||||
|
||||
|
|
@ -882,16 +882,16 @@ func (e *Executor) executeFieldRangeSlice(ctx context.Context, index string, c *
|
|||
// LT[E] and GT[E] should return all not-null if selected range fully encompasses valid field range.
|
||||
if (cond.Op == pql.LT && value > field.Max) || (cond.Op == pql.LTE && value >= field.Max) ||
|
||||
(cond.Op == pql.GT && value < field.Min) || (cond.Op == pql.GTE && value <= field.Min) {
|
||||
return frag.FieldNotNull(field.BitDepth())
|
||||
return frag.NotNull(field.BitDepth())
|
||||
}
|
||||
|
||||
// outOfRange for NEQ should return all not-null.
|
||||
if outOfRange && cond.Op == pql.NEQ {
|
||||
return frag.FieldNotNull(field.BitDepth())
|
||||
return frag.NotNull(field.BitDepth())
|
||||
}
|
||||
|
||||
f.Stats.Count("range:field", 1, 1.0)
|
||||
return frag.FieldRange(cond.Op, field.BitDepth(), baseValue)
|
||||
return frag.RangeOp(cond.Op, field.BitDepth(), baseValue)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) {
|
|||
}
|
||||
|
||||
f := hldr.Frame("i", "f")
|
||||
if value, exists, err := f.Value(10, "f"); err != nil {
|
||||
if value, exists, err := f.Value(10); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !exists {
|
||||
t.Fatal("expected value to exist")
|
||||
|
|
@ -298,7 +298,7 @@ func TestExecutor_Execute_SetValue(t *testing.T) {
|
|||
t.Fatalf("unexpected value: %v", value)
|
||||
}
|
||||
|
||||
if value, exists, err := f.Value(100, "f"); err != nil {
|
||||
if value, exists, err := f.Value(100); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !exists {
|
||||
t.Fatal("expected value to exist")
|
||||
|
|
@ -319,21 +319,21 @@ func TestExecutor_Execute_SetValue(t *testing.T) {
|
|||
t.Fatal(err)
|
||||
}
|
||||
|
||||
t.Run("ErrColumnFieldRequired", func(t *testing.T) {
|
||||
t.Run("ErrColumnBSIGroupRequired", func(t *testing.T) {
|
||||
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
|
||||
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetValue(invalid_column_name=10, f=100)`), nil, nil); err == nil || err.Error() != `SetValue() column field 'col' required` {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("ErrColumnFieldValue", func(t *testing.T) {
|
||||
t.Run("ErrColumnBSIGroupValue", func(t *testing.T) {
|
||||
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
|
||||
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetValue(invalid_column_name="bad_column", f=100)`), nil, nil); err == nil || err.Error() != `SetValue() column field 'col' required` {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("ErrInvalidFieldValueType", func(t *testing.T) {
|
||||
t.Run("ErrInvalidBSIGroupValueType", func(t *testing.T) {
|
||||
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
|
||||
if _, err := e.Execute(context.Background(), "i", test.MustParse(`SetValue(col=10, f="hello")`), nil, nil); err == nil || err != pilosa.ErrInvalidBSIGroupValueType {
|
||||
t.Fatalf("unexpected error: %s", err)
|
||||
|
|
@ -728,7 +728,7 @@ func TestExecutor_Execute_Sum(t *testing.T) {
|
|||
}
|
||||
|
||||
// Ensure a range query can be executed.
|
||||
func TestExecutor_Execute_Range(t *testing.T) {
|
||||
func TestExecutor_Execute_BSIGroupRange(t *testing.T) {
|
||||
hldr := test.MustOpenHolder()
|
||||
defer hldr.Close()
|
||||
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
|
||||
|
|
@ -770,7 +770,7 @@ func TestExecutor_Execute_Range(t *testing.T) {
|
|||
}
|
||||
|
||||
// Ensure a Range(field) query can be executed.
|
||||
func TestExecutor_Execute_FieldRange(t *testing.T) {
|
||||
func TestExecutor_Execute_Range(t *testing.T) {
|
||||
hldr := test.MustOpenHolder()
|
||||
defer hldr.Close()
|
||||
e := test.NewExecutor(hldr.Holder, test.NewCluster(1))
|
||||
|
|
@ -903,8 +903,8 @@ func TestExecutor_Execute_FieldRange(t *testing.T) {
|
|||
}
|
||||
})
|
||||
|
||||
// Ensure that the FieldNotNull code path gets run.
|
||||
t.Run("FieldNotNull", func(t *testing.T) {
|
||||
// Ensure that the NotNull code path gets run.
|
||||
t.Run("NotNull", func(t *testing.T) {
|
||||
if result, err := e.Execute(context.Background(), "i", test.MustParse(`Range(frame=other, other >< [0, 1000])`), nil, nil); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual([]uint64{0}, result[0].(*pilosa.Row).Columns()) {
|
||||
|
|
@ -950,7 +950,7 @@ func TestExecutor_Execute_FieldRange(t *testing.T) {
|
|||
}
|
||||
})
|
||||
|
||||
t.Run("ErrFieldNotFound", func(t *testing.T) {
|
||||
t.Run("ErrBSIGroupNotFound", func(t *testing.T) {
|
||||
if _, err := e.Execute(context.Background(), "i", test.MustParse(`Range(frame=foo, bad_field >= 20)`), nil, nil); err != pilosa.ErrBSIGroupNotFound {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
|||
52
fragment.go
52
fragment.go
|
|
@ -486,8 +486,8 @@ func (f *Fragment) bit(rowID, columnID uint64) (bool, error) {
|
|||
return f.storage.Contains(pos), nil
|
||||
}
|
||||
|
||||
// FieldValue uses a column of bits to read a multi-bit value.
|
||||
func (f *Fragment) FieldValue(columnID uint64, bitDepth uint) (value uint64, exists bool, err error) {
|
||||
// Value uses a column of bits to read a multi-bit value.
|
||||
func (f *Fragment) Value(columnID uint64, bitDepth uint) (value uint64, exists bool, err error) {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
|
||||
|
|
@ -582,9 +582,9 @@ func (f *Fragment) importSetValue(columnID uint64, bitDepth uint, value uint64)
|
|||
return changed, nil
|
||||
}
|
||||
|
||||
// FieldSum returns the sum of a given field as well as the number of columns involved.
|
||||
// Sum returns the sum of a given bsiGroup as well as the number of columns involved.
|
||||
// A bitmap can be passed in to optionally filter the computed columns.
|
||||
func (f *Fragment) FieldSum(filter *Row, bitDepth uint) (sum, count uint64, err error) {
|
||||
func (f *Fragment) Sum(filter *Row, bitDepth uint) (sum, count uint64, err error) {
|
||||
// Compute count based on the existence row.
|
||||
row := f.Row(uint64(bitDepth))
|
||||
if filter != nil {
|
||||
|
|
@ -614,9 +614,9 @@ func (f *Fragment) FieldSum(filter *Row, bitDepth uint) (sum, count uint64, err
|
|||
return sum, count, nil
|
||||
}
|
||||
|
||||
// FieldMin returns the min of a given field as well as the number of columns involved.
|
||||
// Min returns the min of a given bsiGroup as well as the number of columns involved.
|
||||
// A bitmap can be passed in to optionally filter the computed columns.
|
||||
func (f *Fragment) FieldMin(filter *Row, bitDepth uint) (min, count uint64, err error) {
|
||||
func (f *Fragment) Min(filter *Row, bitDepth uint) (min, count uint64, err error) {
|
||||
|
||||
consider := f.Row(uint64(bitDepth))
|
||||
if filter != nil {
|
||||
|
|
@ -647,9 +647,9 @@ func (f *Fragment) FieldMin(filter *Row, bitDepth uint) (min, count uint64, err
|
|||
return min, count, nil
|
||||
}
|
||||
|
||||
// FieldMax returns the max of a given field as well as the number of columns involved.
|
||||
// Max returns the max of a given bsiGroup as well as the number of columns involved.
|
||||
// A bitmap can be passed in to optionally filter the computed columns.
|
||||
func (f *Fragment) FieldMax(filter *Row, bitDepth uint) (max, count uint64, err error) {
|
||||
func (f *Fragment) Max(filter *Row, bitDepth uint) (max, count uint64, err error) {
|
||||
|
||||
consider := f.Row(uint64(bitDepth))
|
||||
if filter != nil {
|
||||
|
|
@ -678,23 +678,23 @@ func (f *Fragment) FieldMax(filter *Row, bitDepth uint) (max, count uint64, err
|
|||
return max, count, nil
|
||||
}
|
||||
|
||||
// FieldRange returns bitmaps with a field value encoding matching the predicate.
|
||||
func (f *Fragment) FieldRange(op pql.Token, bitDepth uint, predicate uint64) (*Row, error) {
|
||||
// RangeOp returns bitmaps with a bsiGroup value encoding matching the predicate.
|
||||
func (f *Fragment) RangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, error) {
|
||||
switch op {
|
||||
case pql.EQ:
|
||||
return f.fieldRangeEQ(bitDepth, predicate)
|
||||
return f.rangeEQ(bitDepth, predicate)
|
||||
case pql.NEQ:
|
||||
return f.fieldRangeNEQ(bitDepth, predicate)
|
||||
return f.rangeNEQ(bitDepth, predicate)
|
||||
case pql.LT, pql.LTE:
|
||||
return f.fieldRangeLT(bitDepth, predicate, op == pql.LTE)
|
||||
return f.rangeLT(bitDepth, predicate, op == pql.LTE)
|
||||
case pql.GT, pql.GTE:
|
||||
return f.fieldRangeGT(bitDepth, predicate, op == pql.GTE)
|
||||
return f.rangeGT(bitDepth, predicate, op == pql.GTE)
|
||||
default:
|
||||
return nil, ErrInvalidRangeOperation
|
||||
}
|
||||
}
|
||||
|
||||
func (f *Fragment) fieldRangeEQ(bitDepth uint, predicate uint64) (*Row, error) {
|
||||
func (f *Fragment) rangeEQ(bitDepth uint, predicate uint64) (*Row, error) {
|
||||
// Start with set of columns with values set.
|
||||
b := f.Row(uint64(bitDepth))
|
||||
|
||||
|
|
@ -713,12 +713,12 @@ func (f *Fragment) fieldRangeEQ(bitDepth uint, predicate uint64) (*Row, error) {
|
|||
return b, nil
|
||||
}
|
||||
|
||||
func (f *Fragment) fieldRangeNEQ(bitDepth uint, predicate uint64) (*Row, error) {
|
||||
func (f *Fragment) rangeNEQ(bitDepth uint, predicate uint64) (*Row, error) {
|
||||
// Start with set of columns with values set.
|
||||
b := f.Row(uint64(bitDepth))
|
||||
|
||||
// Get the equal bitmap.
|
||||
eq, err := f.fieldRangeEQ(bitDepth, predicate)
|
||||
eq, err := f.rangeEQ(bitDepth, predicate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -729,7 +729,7 @@ func (f *Fragment) fieldRangeNEQ(bitDepth uint, predicate uint64) (*Row, error)
|
|||
return b, nil
|
||||
}
|
||||
|
||||
func (f *Fragment) fieldRangeLT(bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) {
|
||||
func (f *Fragment) rangeLT(bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) {
|
||||
keep := NewRow()
|
||||
|
||||
// Start with set of columns with values set.
|
||||
|
|
@ -777,7 +777,7 @@ func (f *Fragment) fieldRangeLT(bitDepth uint, predicate uint64, allowEquality b
|
|||
return b, nil
|
||||
}
|
||||
|
||||
func (f *Fragment) fieldRangeGT(bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) {
|
||||
func (f *Fragment) rangeGT(bitDepth uint, predicate uint64, allowEquality bool) (*Row, error) {
|
||||
b := f.Row(uint64(bitDepth))
|
||||
keep := NewRow()
|
||||
|
||||
|
|
@ -812,13 +812,13 @@ func (f *Fragment) fieldRangeGT(bitDepth uint, predicate uint64, allowEquality b
|
|||
return b, nil
|
||||
}
|
||||
|
||||
// FieldNotNull returns the not-null row (stored at bitDepth).
|
||||
func (f *Fragment) FieldNotNull(bitDepth uint) (*Row, error) {
|
||||
// NotNull returns the not-null row (stored at bitDepth).
|
||||
func (f *Fragment) NotNull(bitDepth uint) (*Row, error) {
|
||||
return f.Row(uint64(bitDepth)), nil
|
||||
}
|
||||
|
||||
// FieldRangeBetween returns bitmaps with a field value encoding matching any value between predicateMin and predicateMax.
|
||||
func (f *Fragment) FieldRangeBetween(bitDepth uint, predicateMin, predicateMax uint64) (*Row, error) {
|
||||
// RangeBetween returns bitmaps with a bsiGroup value encoding matching any value between predicateMin and predicateMax.
|
||||
func (f *Fragment) RangeBetween(bitDepth uint, predicateMin, predicateMax uint64) (*Row, error) {
|
||||
b := f.Row(uint64(bitDepth))
|
||||
keep1 := NewRow() // GTE
|
||||
keep2 := NewRow() // LTE
|
||||
|
|
@ -900,7 +900,7 @@ func (f *Fragment) Top(opt TopOptions) ([]Pair, error) {
|
|||
|
||||
// Create a fast lookup of filter values.
|
||||
var filters map[interface{}]struct{}
|
||||
if opt.FilterField != "" && len(opt.FilterValues) > 0 {
|
||||
if opt.FilterName != "" && len(opt.FilterValues) > 0 {
|
||||
filters = make(map[interface{}]struct{})
|
||||
for _, v := range opt.FilterValues {
|
||||
filters[v] = struct{}{}
|
||||
|
|
@ -948,7 +948,7 @@ func (f *Fragment) Top(opt TopOptions) ([]Pair, error) {
|
|||
return nil, errors.Wrap(err, "getting attrs")
|
||||
} else if attr == nil {
|
||||
continue
|
||||
} else if attrValue := attr[opt.FilterField]; attrValue == nil {
|
||||
} else if attrValue := attr[opt.FilterName]; attrValue == nil {
|
||||
continue
|
||||
} else if _, ok := filters[attrValue]; !ok {
|
||||
continue
|
||||
|
|
@ -1074,7 +1074,7 @@ type TopOptions struct {
|
|||
MinThreshold uint64
|
||||
|
||||
// Filter field name & values.
|
||||
FilterField string
|
||||
FilterName string
|
||||
FilterValues []interface{}
|
||||
TanimotoThreshold uint64
|
||||
}
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ func TestFragment_SetValue(t *testing.T) {
|
|||
}
|
||||
|
||||
// Read value.
|
||||
if value, exists, err := f.FieldValue(100, 16); err != nil {
|
||||
if value, exists, err := f.Value(100, 16); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if value != 3829 {
|
||||
t.Fatalf("unexpected value: %d", value)
|
||||
|
|
@ -145,7 +145,7 @@ func TestFragment_SetValue(t *testing.T) {
|
|||
}
|
||||
|
||||
// Read value.
|
||||
if value, exists, err := f.FieldValue(100, 16); err != nil {
|
||||
if value, exists, err := f.Value(100, 16); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if value != 2028 {
|
||||
t.Fatalf("unexpected value: %d", value)
|
||||
|
|
@ -166,7 +166,7 @@ func TestFragment_SetValue(t *testing.T) {
|
|||
}
|
||||
|
||||
// Non-existent value.
|
||||
if value, exists, err := f.FieldValue(100, 11); err != nil {
|
||||
if value, exists, err := f.Value(100, 11); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if value != 0 {
|
||||
t.Fatalf("unexpected value: %d", value)
|
||||
|
|
@ -202,7 +202,7 @@ func TestFragment_SetValue(t *testing.T) {
|
|||
|
||||
// Ensure values are set.
|
||||
for columnID, value := range m {
|
||||
v, exists, err := f.FieldValue(columnID, bitDepth)
|
||||
v, exists, err := f.Value(columnID, bitDepth)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
} else if value != int64(v) {
|
||||
|
|
@ -238,7 +238,7 @@ func TestFragment_FieldSum(t *testing.T) {
|
|||
}
|
||||
|
||||
t.Run("NoFilter", func(t *testing.T) {
|
||||
if sum, n, err := f.FieldSum(nil, bitDepth); err != nil {
|
||||
if sum, n, err := f.Sum(nil, bitDepth); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if n != 4 {
|
||||
t.Fatalf("unexpected count: %d", n)
|
||||
|
|
@ -248,7 +248,7 @@ func TestFragment_FieldSum(t *testing.T) {
|
|||
})
|
||||
|
||||
t.Run("WithFilter", func(t *testing.T) {
|
||||
if sum, n, err := f.FieldSum(pilosa.NewRow(2000, 4000, 5000), bitDepth); err != nil {
|
||||
if sum, n, err := f.Sum(pilosa.NewRow(2000, 4000, 5000), bitDepth); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if n != 2 {
|
||||
t.Fatalf("unexpected count: %d", n)
|
||||
|
|
@ -296,7 +296,7 @@ func TestFragment_FieldMinMax(t *testing.T) {
|
|||
{filter: pilosa.NewRow(7000), exp: 0, cnt: 1},
|
||||
}
|
||||
for i, test := range tests {
|
||||
if min, cnt, err := f.FieldMin(test.filter, bitDepth); err != nil {
|
||||
if min, cnt, err := f.Min(test.filter, bitDepth); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if min != test.exp {
|
||||
t.Errorf("test %d expected min: %v, but got: %v", i, test.exp, min)
|
||||
|
|
@ -320,7 +320,7 @@ func TestFragment_FieldMinMax(t *testing.T) {
|
|||
{filter: pilosa.NewRow(7000), exp: 0, cnt: 1},
|
||||
}
|
||||
for i, test := range tests {
|
||||
if max, cnt, err := f.FieldMax(test.filter, bitDepth); err != nil {
|
||||
if max, cnt, err := f.Max(test.filter, bitDepth); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if max != test.exp {
|
||||
t.Errorf("test %d expected max: %v, but got: %v", i, test.exp, max)
|
||||
|
|
@ -351,7 +351,7 @@ func TestFragment_FieldRange(t *testing.T) {
|
|||
}
|
||||
|
||||
// Query for equality.
|
||||
if b, err := f.FieldRange(pql.EQ, bitDepth, 300); err != nil {
|
||||
if b, err := f.RangeOp(pql.EQ, bitDepth, 300); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{2000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
|
|
@ -374,7 +374,7 @@ func TestFragment_FieldRange(t *testing.T) {
|
|||
}
|
||||
|
||||
// Query for inequality.
|
||||
if b, err := f.FieldRange(pql.NEQ, bitDepth, 300); err != nil {
|
||||
if b, err := f.RangeOp(pql.NEQ, bitDepth, 300); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 3000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
|
|
@ -401,28 +401,28 @@ func TestFragment_FieldRange(t *testing.T) {
|
|||
}
|
||||
|
||||
// Query for fields less than (ending with set column).
|
||||
if b, err := f.FieldRange(pql.LT, bitDepth, 301); err != nil {
|
||||
if b, err := f.RangeOp(pql.LT, bitDepth, 301); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{2000, 5000, 6000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields less than (ending with unset column).
|
||||
if b, err := f.FieldRange(pql.LT, bitDepth, 300); err != nil {
|
||||
if b, err := f.RangeOp(pql.LT, bitDepth, 300); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{5000, 6000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields less than or equal to (ending with set column).
|
||||
if b, err := f.FieldRange(pql.LTE, bitDepth, 301); err != nil {
|
||||
if b, err := f.RangeOp(pql.LTE, bitDepth, 301); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{2000, 4000, 5000, 6000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields less than or equal to (ending with unset column).
|
||||
if b, err := f.FieldRange(pql.LTE, bitDepth, 300); err != nil {
|
||||
if b, err := f.RangeOp(pql.LTE, bitDepth, 300); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{2000, 5000, 6000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
|
|
@ -449,28 +449,28 @@ func TestFragment_FieldRange(t *testing.T) {
|
|||
}
|
||||
|
||||
// Query for fields greater than (ending with unset bit).
|
||||
if b, err := f.FieldRange(pql.GT, bitDepth, 300); err != nil {
|
||||
if b, err := f.RangeOp(pql.GT, bitDepth, 300); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 3000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields greater than (ending with set bit).
|
||||
if b, err := f.FieldRange(pql.GT, bitDepth, 301); err != nil {
|
||||
if b, err := f.RangeOp(pql.GT, bitDepth, 301); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 3000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields greater than or equal to (ending with unset bit).
|
||||
if b, err := f.FieldRange(pql.GTE, bitDepth, 300); err != nil {
|
||||
if b, err := f.RangeOp(pql.GTE, bitDepth, 300); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 2000, 3000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields greater than or equal to (ending with set bit).
|
||||
if b, err := f.FieldRange(pql.GTE, bitDepth, 301); err != nil {
|
||||
if b, err := f.RangeOp(pql.GTE, bitDepth, 301); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 3000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
|
|
@ -497,28 +497,28 @@ func TestFragment_FieldRange(t *testing.T) {
|
|||
}
|
||||
|
||||
// Query for fields greater than (ending with unset column).
|
||||
if b, err := f.FieldRangeBetween(bitDepth, 300, 2817); err != nil {
|
||||
if b, err := f.RangeBetween(bitDepth, 300, 2817); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 2000, 3000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields greater than (ending with set column).
|
||||
if b, err := f.FieldRangeBetween(bitDepth, 301, 2817); err != nil {
|
||||
if b, err := f.RangeBetween(bitDepth, 301, 2817); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 3000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields greater than or equal to (ending with unset column).
|
||||
if b, err := f.FieldRangeBetween(bitDepth, 301, 2816); err != nil {
|
||||
if b, err := f.RangeBetween(bitDepth, 301, 2816); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
}
|
||||
|
||||
// Query for fields greater than or equal to (ending with set column).
|
||||
if b, err := f.FieldRangeBetween(bitDepth, 300, 2816); err != nil {
|
||||
if b, err := f.RangeBetween(bitDepth, 300, 2816); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if !reflect.DeepEqual(b.Columns(), []uint64{1000, 2000, 4000}) {
|
||||
t.Fatalf("unexpected columns: %+v", b.Columns())
|
||||
|
|
@ -623,7 +623,7 @@ func TestFragment_Top_Filter(t *testing.T) {
|
|||
// Retrieve top rows.
|
||||
if pairs, err := f.Top(pilosa.TopOptions{
|
||||
N: 2,
|
||||
FilterField: "x",
|
||||
FilterName: "x",
|
||||
FilterValues: []interface{}{int64(10), int64(15), int64(20)},
|
||||
}); err != nil {
|
||||
t.Fatal(err)
|
||||
|
|
|
|||
99
frame.go
99
frame.go
|
|
@ -424,7 +424,7 @@ func (f *Frame) addBSIGroup(bsig *bsiGroup) error {
|
|||
// Add bsiGroup to list.
|
||||
f.bsiGroups = append(f.bsiGroups, bsig)
|
||||
|
||||
// Sort fields by name.
|
||||
// Sort bsiGroups by name.
|
||||
sort.Slice(f.bsiGroups, func(i, j int) bool {
|
||||
return f.bsiGroups[i].Name < f.bsiGroups[j].Name
|
||||
})
|
||||
|
|
@ -432,13 +432,12 @@ func (f *Frame) addBSIGroup(bsig *bsiGroup) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// TODO: merge this into the un-exported deleteBSIGroup.
|
||||
// deleteBSIGroupAndView deletes an existing field on the schema.
|
||||
// deleteBSIGroupAndView deletes an existing bsiGroup on the schema.
|
||||
func (f *Frame) deleteBSIGroupAndView(name string) error {
|
||||
f.mu.Lock()
|
||||
defer f.mu.Unlock()
|
||||
|
||||
// Remove field.
|
||||
// Remove bsiGroup.
|
||||
if err := f.deleteBSIGroup(name); err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
@ -705,37 +704,37 @@ func (f *Frame) ClearBit(name string, rowID, colID uint64, t *time.Time) (change
|
|||
return changed, nil
|
||||
}
|
||||
|
||||
// Value reads a bsiGroup value for a column.
|
||||
func (f *Frame) Value(columnID uint64, name string) (value int64, exists bool, err error) {
|
||||
field := f.bsiGroup(name)
|
||||
if field == nil {
|
||||
// Value reads a frame value for a column.
|
||||
func (f *Frame) Value(columnID uint64) (value int64, exists bool, err error) {
|
||||
bsig := f.bsiGroup(f.name)
|
||||
if bsig == nil {
|
||||
return 0, false, ErrBSIGroupNotFound
|
||||
}
|
||||
|
||||
// Fetch target view.
|
||||
view := f.View(viewBSIGroupPrefix + name)
|
||||
view := f.View(viewBSIGroupPrefix + f.name)
|
||||
if view == nil {
|
||||
return 0, false, nil
|
||||
}
|
||||
|
||||
v, exists, err := view.value(columnID, field.BitDepth())
|
||||
v, exists, err := view.value(columnID, bsig.BitDepth())
|
||||
if err != nil {
|
||||
return 0, false, err
|
||||
} else if !exists {
|
||||
return 0, false, nil
|
||||
}
|
||||
return int64(v) + field.Min, true, nil
|
||||
return int64(v) + bsig.Min, true, nil
|
||||
}
|
||||
|
||||
// SetValue sets a field value for a column.
|
||||
// SetValue sets a frame value for a column.
|
||||
func (f *Frame) SetValue(columnID uint64, value int64) (changed bool, err error) {
|
||||
// Fetch field and validate value.
|
||||
field := f.bsiGroup(f.name)
|
||||
if field == nil {
|
||||
// Fetch bsiGroup and validate value.
|
||||
bsig := f.bsiGroup(f.name)
|
||||
if bsig == nil {
|
||||
return false, ErrBSIGroupNotFound
|
||||
} else if value < field.Min {
|
||||
} else if value < bsig.Min {
|
||||
return false, ErrBSIGroupValueTooLow
|
||||
} else if value > field.Max {
|
||||
} else if value > bsig.Max {
|
||||
return false, ErrBSIGroupValueTooHigh
|
||||
}
|
||||
|
||||
|
|
@ -746,16 +745,16 @@ func (f *Frame) SetValue(columnID uint64, value int64) (changed bool, err error)
|
|||
}
|
||||
|
||||
// Determine base value to store.
|
||||
baseValue := uint64(value - field.Min)
|
||||
baseValue := uint64(value - bsig.Min)
|
||||
|
||||
return view.setValue(columnID, field.BitDepth(), baseValue)
|
||||
return view.setValue(columnID, bsig.BitDepth(), baseValue)
|
||||
}
|
||||
|
||||
// Sum returns the sum and count for a field.
|
||||
// Sum returns the sum and count for a frame.
|
||||
// An optional filtering row can be provided.
|
||||
func (f *Frame) Sum(filter *Row, name string) (sum, count int64, err error) {
|
||||
field := f.bsiGroup(name)
|
||||
if field == nil {
|
||||
bsig := f.bsiGroup(name)
|
||||
if bsig == nil {
|
||||
return 0, 0, ErrBSIGroupNotFound
|
||||
}
|
||||
|
||||
|
|
@ -764,14 +763,14 @@ func (f *Frame) Sum(filter *Row, name string) (sum, count int64, err error) {
|
|||
return 0, 0, nil
|
||||
}
|
||||
|
||||
vsum, vcount, err := view.sum(filter, field.BitDepth())
|
||||
vsum, vcount, err := view.sum(filter, bsig.BitDepth())
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
return int64(vsum) + (int64(vcount) * field.Min), int64(vcount), nil
|
||||
return int64(vsum) + (int64(vcount) * bsig.Min), int64(vcount), nil
|
||||
}
|
||||
|
||||
// Min returns the min for a field.
|
||||
// Min returns the min for a frame.
|
||||
// An optional filtering row can be provided.
|
||||
func (f *Frame) Min(filter *Row, name string) (min, count int64, err error) {
|
||||
bsig := f.bsiGroup(name)
|
||||
|
|
@ -791,11 +790,11 @@ func (f *Frame) Min(filter *Row, name string) (min, count int64, err error) {
|
|||
return int64(vmin) + bsig.Min, int64(vcount), nil
|
||||
}
|
||||
|
||||
// Max returns the max for a field.
|
||||
// Max returns the max for a frame.
|
||||
// An optional filtering row can be provided.
|
||||
func (f *Frame) Max(filter *Row, name string) (max, count int64, err error) {
|
||||
field := f.bsiGroup(name)
|
||||
if field == nil {
|
||||
bsig := f.bsiGroup(name)
|
||||
if bsig == nil {
|
||||
return 0, 0, ErrBSIGroupNotFound
|
||||
}
|
||||
|
||||
|
|
@ -804,57 +803,57 @@ func (f *Frame) Max(filter *Row, name string) (max, count int64, err error) {
|
|||
return 0, 0, nil
|
||||
}
|
||||
|
||||
vmax, vcount, err := view.max(filter, field.BitDepth())
|
||||
vmax, vcount, err := view.max(filter, bsig.BitDepth())
|
||||
if err != nil {
|
||||
return 0, 0, err
|
||||
}
|
||||
return int64(vmax) + field.Min, int64(vcount), nil
|
||||
return int64(vmax) + bsig.Min, int64(vcount), nil
|
||||
}
|
||||
|
||||
func (f *Frame) Range(name string, op pql.Token, predicate int64) (*Row, error) {
|
||||
// Retrieve and validate field.
|
||||
field := f.bsiGroup(name)
|
||||
if field == nil {
|
||||
// Retrieve and validate bsiGroup.
|
||||
bsig := f.bsiGroup(name)
|
||||
if bsig == nil {
|
||||
return nil, ErrBSIGroupNotFound
|
||||
} else if predicate < field.Min || predicate > field.Max {
|
||||
} else if predicate < bsig.Min || predicate > bsig.Max {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// Retrieve field's view.
|
||||
// Retrieve bsiGroup's view.
|
||||
view := f.View(viewBSIGroupPrefix + name)
|
||||
if view == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
baseValue, outOfRange := field.baseValue(op, predicate)
|
||||
baseValue, outOfRange := bsig.baseValue(op, predicate)
|
||||
if outOfRange {
|
||||
return NewRow(), nil
|
||||
}
|
||||
|
||||
return view.rangeOp(op, field.BitDepth(), baseValue)
|
||||
return view.rangeOp(op, bsig.BitDepth(), baseValue)
|
||||
}
|
||||
|
||||
func (f *Frame) RangeBetween(name string, predicateMin, predicateMax int64) (*Row, error) {
|
||||
// Retrieve and validate field.
|
||||
field := f.bsiGroup(name)
|
||||
if field == nil {
|
||||
// Retrieve and validate bsiGroup.
|
||||
bsig := f.bsiGroup(name)
|
||||
if bsig == nil {
|
||||
return nil, ErrBSIGroupNotFound
|
||||
} else if predicateMin > predicateMax {
|
||||
return nil, ErrInvalidBetweenValue
|
||||
}
|
||||
|
||||
// Retrieve field's view.
|
||||
// Retrieve bsiGroup's view.
|
||||
view := f.View(viewBSIGroupPrefix + name)
|
||||
if view == nil {
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
baseValueMin, baseValueMax, outOfRange := field.baseValueBetween(predicateMin, predicateMax)
|
||||
baseValueMin, baseValueMax, outOfRange := bsig.baseValueBetween(predicateMin, predicateMax)
|
||||
if outOfRange {
|
||||
return NewRow(), nil
|
||||
}
|
||||
|
||||
return view.rangeBetween(field.BitDepth(), baseValueMin, baseValueMax)
|
||||
return view.rangeBetween(bsig.BitDepth(), baseValueMin, baseValueMax)
|
||||
}
|
||||
|
||||
// Import bulk imports data.
|
||||
|
|
@ -915,12 +914,12 @@ func (f *Frame) Import(rowIDs, columnIDs []uint64, timestamps []*time.Time) erro
|
|||
}
|
||||
|
||||
// ImportValue bulk imports range-encoded value data.
|
||||
func (f *Frame) ImportValue(fieldName string, columnIDs []uint64, values []int64) error {
|
||||
viewName := viewBSIGroupPrefix + fieldName
|
||||
func (f *Frame) ImportValue(columnIDs []uint64, values []int64) error {
|
||||
viewName := viewBSIGroupPrefix + f.name
|
||||
// Get the bsiGroup so we know bitDepth.
|
||||
bsig := f.bsiGroup(fieldName)
|
||||
bsig := f.bsiGroup(f.name)
|
||||
if bsig == nil {
|
||||
return errors.Wrap(ErrBSIGroupNotFound, fieldName)
|
||||
return errors.Wrap(ErrBSIGroupNotFound, f.name)
|
||||
}
|
||||
|
||||
// Split import data by fragment.
|
||||
|
|
@ -1085,7 +1084,7 @@ func isValidBSIGroupType(v string) bool {
|
|||
}
|
||||
}
|
||||
|
||||
// bsiGroup represents a range field on a frame.
|
||||
// bsiGroup represents a group of range-encoded rows on a frame.
|
||||
type bsiGroup struct {
|
||||
Name string `json:"name,omitempty"`
|
||||
Type string `json:"type,omitempty"`
|
||||
|
|
@ -1113,8 +1112,8 @@ func (b *bsiGroup) BitDepth() uint {
|
|||
// Note that in this case (because the range uses the full BitDepth 0 to 1023),
|
||||
// we can't simply return 1024.
|
||||
// In order to make this work, we effectively need to change the operator to LTE.
|
||||
// Executor.executeFieldRangeSlice() takes this into account and returns
|
||||
// `frag.FieldNotNull(field.BitDepth())` in such instances.
|
||||
// Executor.executeBSIGroupRangeSlice() takes this into account and returns
|
||||
// `frag.FieldNotNull(bsig.BitDepth())` in such instances.
|
||||
func (b *bsiGroup) baseValue(op pql.Token, value int64) (baseValue uint64, outOfRange bool) {
|
||||
if op == pql.GT || op == pql.GTE {
|
||||
if value > b.Max {
|
||||
|
|
|
|||
|
|
@ -21,8 +21,8 @@ import (
|
|||
"github.com/pilosa/pilosa/pql"
|
||||
)
|
||||
|
||||
// Ensure a field can adjust to its baseValue.
|
||||
func TestField_BaseValue(t *testing.T) {
|
||||
// Ensure a bsiGroup can adjust to its baseValue.
|
||||
func TestBSIGroup_BaseValue(t *testing.T) {
|
||||
b0 := &bsiGroup{
|
||||
Name: "b0",
|
||||
Type: bsiGroupTypeInt,
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ func TestFrame_SetValue(t *testing.T) {
|
|||
}
|
||||
|
||||
// Read value.
|
||||
if value, exists, err := f.Value(100, "f"); err != nil {
|
||||
if value, exists, err := f.Value(100); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if value != 21 {
|
||||
t.Fatalf("unexpected value: %d", value)
|
||||
|
|
@ -138,7 +138,7 @@ func TestFrame_SetValue(t *testing.T) {
|
|||
}
|
||||
|
||||
// Read value.
|
||||
if value, exists, err := f.Value(100, "f"); err != nil {
|
||||
if value, exists, err := f.Value(100); err != nil {
|
||||
t.Fatal(err)
|
||||
} else if value != 23 {
|
||||
t.Fatalf("unexpected value: %d", value)
|
||||
|
|
|
|||
|
|
@ -158,7 +158,7 @@ func TestIndex_CreateFrame(t *testing.T) {
|
|||
}
|
||||
})
|
||||
|
||||
t.Run("ErrInvalidFieldRange", func(t *testing.T) {
|
||||
t.Run("ErrInvalidBSIGroupRange", func(t *testing.T) {
|
||||
index := test.MustOpenIndex()
|
||||
defer index.Close()
|
||||
|
||||
|
|
@ -166,7 +166,7 @@ func TestIndex_CreateFrame(t *testing.T) {
|
|||
Fields: []*pilosa.Field{
|
||||
{Name: "field0", Type: pilosa.FieldTypeInt, Min: 100, Max: 50},
|
||||
},
|
||||
}); err != pilosa.ErrInvalidFieldRange {
|
||||
}); err != pilosa.ErrInvalidBSIGroupRange {
|
||||
t.Fatal(err)
|
||||
}
|
||||
})
|
||||
|
|
|
|||
|
|
@ -21,8 +21,6 @@
|
|||
CreateIndexMessage
|
||||
CreateFrameMessage
|
||||
DeleteFrameMessage
|
||||
CreateBSIGroupMessage
|
||||
DeleteBSIGroupMessage
|
||||
Frame
|
||||
Schema
|
||||
Index
|
||||
|
|
@ -366,70 +364,6 @@ func (m *DeleteFrameMessage) GetFrame() string {
|
|||
return ""
|
||||
}
|
||||
|
||||
type CreateBSIGroupMessage struct {
|
||||
Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"`
|
||||
Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"`
|
||||
BSIGroup *BSIGroup `protobuf:"bytes,3,opt,name=BSIGroup" json:"BSIGroup,omitempty"`
|
||||
}
|
||||
|
||||
func (m *CreateBSIGroupMessage) Reset() { *m = CreateBSIGroupMessage{} }
|
||||
func (m *CreateBSIGroupMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateBSIGroupMessage) ProtoMessage() {}
|
||||
func (*CreateBSIGroupMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} }
|
||||
|
||||
func (m *CreateBSIGroupMessage) GetIndex() string {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateBSIGroupMessage) GetFrame() string {
|
||||
if m != nil {
|
||||
return m.Frame
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *CreateBSIGroupMessage) GetBSIGroup() *BSIGroup {
|
||||
if m != nil {
|
||||
return m.BSIGroup
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type DeleteBSIGroupMessage struct {
|
||||
Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"`
|
||||
Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"`
|
||||
BSIGroup string `protobuf:"bytes,3,opt,name=BSIGroup,proto3" json:"BSIGroup,omitempty"`
|
||||
}
|
||||
|
||||
func (m *DeleteBSIGroupMessage) Reset() { *m = DeleteBSIGroupMessage{} }
|
||||
func (m *DeleteBSIGroupMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteBSIGroupMessage) ProtoMessage() {}
|
||||
func (*DeleteBSIGroupMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} }
|
||||
|
||||
func (m *DeleteBSIGroupMessage) GetIndex() string {
|
||||
if m != nil {
|
||||
return m.Index
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DeleteBSIGroupMessage) GetFrame() string {
|
||||
if m != nil {
|
||||
return m.Frame
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *DeleteBSIGroupMessage) GetBSIGroup() string {
|
||||
if m != nil {
|
||||
return m.BSIGroup
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
type Frame struct {
|
||||
Name string `protobuf:"bytes,1,opt,name=Name,proto3" json:"Name,omitempty"`
|
||||
Meta *FrameMeta `protobuf:"bytes,2,opt,name=Meta" json:"Meta,omitempty"`
|
||||
|
|
@ -439,7 +373,7 @@ type Frame struct {
|
|||
func (m *Frame) Reset() { *m = Frame{} }
|
||||
func (m *Frame) String() string { return proto.CompactTextString(m) }
|
||||
func (*Frame) ProtoMessage() {}
|
||||
func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{14} }
|
||||
func (*Frame) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{12} }
|
||||
|
||||
func (m *Frame) GetName() string {
|
||||
if m != nil {
|
||||
|
|
@ -469,7 +403,7 @@ type Schema struct {
|
|||
func (m *Schema) Reset() { *m = Schema{} }
|
||||
func (m *Schema) String() string { return proto.CompactTextString(m) }
|
||||
func (*Schema) ProtoMessage() {}
|
||||
func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{15} }
|
||||
func (*Schema) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{13} }
|
||||
|
||||
func (m *Schema) GetIndexes() []*Index {
|
||||
if m != nil {
|
||||
|
|
@ -486,7 +420,7 @@ type Index struct {
|
|||
func (m *Index) Reset() { *m = Index{} }
|
||||
func (m *Index) String() string { return proto.CompactTextString(m) }
|
||||
func (*Index) ProtoMessage() {}
|
||||
func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{16} }
|
||||
func (*Index) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{14} }
|
||||
|
||||
func (m *Index) GetName() string {
|
||||
if m != nil {
|
||||
|
|
@ -511,7 +445,7 @@ type URI struct {
|
|||
func (m *URI) Reset() { *m = URI{} }
|
||||
func (m *URI) String() string { return proto.CompactTextString(m) }
|
||||
func (*URI) ProtoMessage() {}
|
||||
func (*URI) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{17} }
|
||||
func (*URI) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{15} }
|
||||
|
||||
func (m *URI) GetScheme() string {
|
||||
if m != nil {
|
||||
|
|
@ -543,7 +477,7 @@ type Node struct {
|
|||
func (m *Node) Reset() { *m = Node{} }
|
||||
func (m *Node) String() string { return proto.CompactTextString(m) }
|
||||
func (*Node) ProtoMessage() {}
|
||||
func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{18} }
|
||||
func (*Node) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{16} }
|
||||
|
||||
func (m *Node) GetID() string {
|
||||
if m != nil {
|
||||
|
|
@ -574,7 +508,7 @@ type NodeStateMessage struct {
|
|||
func (m *NodeStateMessage) Reset() { *m = NodeStateMessage{} }
|
||||
func (m *NodeStateMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeStateMessage) ProtoMessage() {}
|
||||
func (*NodeStateMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{19} }
|
||||
func (*NodeStateMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{17} }
|
||||
|
||||
func (m *NodeStateMessage) GetNodeID() string {
|
||||
if m != nil {
|
||||
|
|
@ -598,7 +532,7 @@ type NodeEventMessage struct {
|
|||
func (m *NodeEventMessage) Reset() { *m = NodeEventMessage{} }
|
||||
func (m *NodeEventMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeEventMessage) ProtoMessage() {}
|
||||
func (*NodeEventMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{20} }
|
||||
func (*NodeEventMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{18} }
|
||||
|
||||
func (m *NodeEventMessage) GetEvent() uint32 {
|
||||
if m != nil {
|
||||
|
|
@ -623,7 +557,7 @@ type NodeStatus struct {
|
|||
func (m *NodeStatus) Reset() { *m = NodeStatus{} }
|
||||
func (m *NodeStatus) String() string { return proto.CompactTextString(m) }
|
||||
func (*NodeStatus) ProtoMessage() {}
|
||||
func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{21} }
|
||||
func (*NodeStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{19} }
|
||||
|
||||
func (m *NodeStatus) GetNode() *Node {
|
||||
if m != nil {
|
||||
|
|
@ -655,7 +589,7 @@ type ClusterStatus struct {
|
|||
func (m *ClusterStatus) Reset() { *m = ClusterStatus{} }
|
||||
func (m *ClusterStatus) String() string { return proto.CompactTextString(m) }
|
||||
func (*ClusterStatus) ProtoMessage() {}
|
||||
func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{22} }
|
||||
func (*ClusterStatus) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{20} }
|
||||
|
||||
func (m *ClusterStatus) GetClusterID() string {
|
||||
if m != nil {
|
||||
|
|
@ -688,7 +622,7 @@ type BSIGroup struct {
|
|||
func (m *BSIGroup) Reset() { *m = BSIGroup{} }
|
||||
func (m *BSIGroup) String() string { return proto.CompactTextString(m) }
|
||||
func (*BSIGroup) ProtoMessage() {}
|
||||
func (*BSIGroup) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} }
|
||||
func (*BSIGroup) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{21} }
|
||||
|
||||
func (m *BSIGroup) GetName() string {
|
||||
if m != nil {
|
||||
|
|
@ -727,7 +661,7 @@ type CreateViewMessage struct {
|
|||
func (m *CreateViewMessage) Reset() { *m = CreateViewMessage{} }
|
||||
func (m *CreateViewMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*CreateViewMessage) ProtoMessage() {}
|
||||
func (*CreateViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{24} }
|
||||
func (*CreateViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{22} }
|
||||
|
||||
func (m *CreateViewMessage) GetIndex() string {
|
||||
if m != nil {
|
||||
|
|
@ -759,7 +693,7 @@ type DeleteViewMessage struct {
|
|||
func (m *DeleteViewMessage) Reset() { *m = DeleteViewMessage{} }
|
||||
func (m *DeleteViewMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*DeleteViewMessage) ProtoMessage() {}
|
||||
func (*DeleteViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{25} }
|
||||
func (*DeleteViewMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{23} }
|
||||
|
||||
func (m *DeleteViewMessage) GetIndex() string {
|
||||
if m != nil {
|
||||
|
|
@ -794,7 +728,7 @@ type ResizeInstruction struct {
|
|||
func (m *ResizeInstruction) Reset() { *m = ResizeInstruction{} }
|
||||
func (m *ResizeInstruction) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResizeInstruction) ProtoMessage() {}
|
||||
func (*ResizeInstruction) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{26} }
|
||||
func (*ResizeInstruction) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{24} }
|
||||
|
||||
func (m *ResizeInstruction) GetJobID() int64 {
|
||||
if m != nil {
|
||||
|
|
@ -849,7 +783,7 @@ type ResizeSource struct {
|
|||
func (m *ResizeSource) Reset() { *m = ResizeSource{} }
|
||||
func (m *ResizeSource) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResizeSource) ProtoMessage() {}
|
||||
func (*ResizeSource) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{27} }
|
||||
func (*ResizeSource) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{25} }
|
||||
|
||||
func (m *ResizeSource) GetNode() *Node {
|
||||
if m != nil {
|
||||
|
|
@ -896,7 +830,7 @@ func (m *ResizeInstructionComplete) Reset() { *m = ResizeInstructionComp
|
|||
func (m *ResizeInstructionComplete) String() string { return proto.CompactTextString(m) }
|
||||
func (*ResizeInstructionComplete) ProtoMessage() {}
|
||||
func (*ResizeInstructionComplete) Descriptor() ([]byte, []int) {
|
||||
return fileDescriptorPrivate, []int{28}
|
||||
return fileDescriptorPrivate, []int{26}
|
||||
}
|
||||
|
||||
func (m *ResizeInstructionComplete) GetJobID() int64 {
|
||||
|
|
@ -927,7 +861,7 @@ type SetCoordinatorMessage struct {
|
|||
func (m *SetCoordinatorMessage) Reset() { *m = SetCoordinatorMessage{} }
|
||||
func (m *SetCoordinatorMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*SetCoordinatorMessage) ProtoMessage() {}
|
||||
func (*SetCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{29} }
|
||||
func (*SetCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{27} }
|
||||
|
||||
func (m *SetCoordinatorMessage) GetNew() *Node {
|
||||
if m != nil {
|
||||
|
|
@ -943,7 +877,7 @@ type UpdateCoordinatorMessage struct {
|
|||
func (m *UpdateCoordinatorMessage) Reset() { *m = UpdateCoordinatorMessage{} }
|
||||
func (m *UpdateCoordinatorMessage) String() string { return proto.CompactTextString(m) }
|
||||
func (*UpdateCoordinatorMessage) ProtoMessage() {}
|
||||
func (*UpdateCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{30} }
|
||||
func (*UpdateCoordinatorMessage) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{28} }
|
||||
|
||||
func (m *UpdateCoordinatorMessage) GetNew() *Node {
|
||||
if m != nil {
|
||||
|
|
@ -960,7 +894,7 @@ type Topology struct {
|
|||
func (m *Topology) Reset() { *m = Topology{} }
|
||||
func (m *Topology) String() string { return proto.CompactTextString(m) }
|
||||
func (*Topology) ProtoMessage() {}
|
||||
func (*Topology) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{31} }
|
||||
func (*Topology) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{29} }
|
||||
|
||||
func (m *Topology) GetClusterID() string {
|
||||
if m != nil {
|
||||
|
|
@ -982,7 +916,7 @@ type RecalculateCaches struct {
|
|||
func (m *RecalculateCaches) Reset() { *m = RecalculateCaches{} }
|
||||
func (m *RecalculateCaches) String() string { return proto.CompactTextString(m) }
|
||||
func (*RecalculateCaches) ProtoMessage() {}
|
||||
func (*RecalculateCaches) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{32} }
|
||||
func (*RecalculateCaches) Descriptor() ([]byte, []int) { return fileDescriptorPrivate, []int{30} }
|
||||
|
||||
func init() {
|
||||
proto.RegisterType((*IndexMeta)(nil), "internal.IndexMeta")
|
||||
|
|
@ -997,8 +931,6 @@ func init() {
|
|||
proto.RegisterType((*CreateIndexMessage)(nil), "internal.CreateIndexMessage")
|
||||
proto.RegisterType((*CreateFrameMessage)(nil), "internal.CreateFrameMessage")
|
||||
proto.RegisterType((*DeleteFrameMessage)(nil), "internal.DeleteFrameMessage")
|
||||
proto.RegisterType((*CreateBSIGroupMessage)(nil), "internal.CreateBSIGroupMessage")
|
||||
proto.RegisterType((*DeleteBSIGroupMessage)(nil), "internal.DeleteBSIGroupMessage")
|
||||
proto.RegisterType((*Frame)(nil), "internal.Frame")
|
||||
proto.RegisterType((*Schema)(nil), "internal.Schema")
|
||||
proto.RegisterType((*Index)(nil), "internal.Index")
|
||||
|
|
@ -1436,82 +1368,6 @@ func (m *DeleteFrameMessage) MarshalTo(dAtA []byte) (int, error) {
|
|||
return i, nil
|
||||
}
|
||||
|
||||
func (m *CreateBSIGroupMessage) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *CreateBSIGroupMessage) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Index) > 0 {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index)))
|
||||
i += copy(dAtA[i:], m.Index)
|
||||
}
|
||||
if len(m.Frame) > 0 {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.Frame)))
|
||||
i += copy(dAtA[i:], m.Frame)
|
||||
}
|
||||
if m.BSIGroup != nil {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.BSIGroup.Size()))
|
||||
n9, err := m.BSIGroup.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n9
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *DeleteBSIGroupMessage) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
n, err := m.MarshalTo(dAtA)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return dAtA[:n], nil
|
||||
}
|
||||
|
||||
func (m *DeleteBSIGroupMessage) MarshalTo(dAtA []byte) (int, error) {
|
||||
var i int
|
||||
_ = i
|
||||
var l int
|
||||
_ = l
|
||||
if len(m.Index) > 0 {
|
||||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.Index)))
|
||||
i += copy(dAtA[i:], m.Index)
|
||||
}
|
||||
if len(m.Frame) > 0 {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.Frame)))
|
||||
i += copy(dAtA[i:], m.Frame)
|
||||
}
|
||||
if len(m.BSIGroup) > 0 {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(len(m.BSIGroup)))
|
||||
i += copy(dAtA[i:], m.BSIGroup)
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
||||
func (m *Frame) Marshal() (dAtA []byte, err error) {
|
||||
size := m.Size()
|
||||
dAtA = make([]byte, size)
|
||||
|
|
@ -1537,11 +1393,11 @@ func (m *Frame) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Meta.Size()))
|
||||
n10, err := m.Meta.MarshalTo(dAtA[i:])
|
||||
n9, err := m.Meta.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n10
|
||||
i += n9
|
||||
}
|
||||
if len(m.Views) > 0 {
|
||||
for _, s := range m.Views {
|
||||
|
|
@ -1687,11 +1543,11 @@ func (m *Node) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.URI.Size()))
|
||||
n11, err := m.URI.MarshalTo(dAtA[i:])
|
||||
n10, err := m.URI.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n11
|
||||
i += n10
|
||||
}
|
||||
if m.IsCoordinator {
|
||||
dAtA[i] = 0x18
|
||||
|
|
@ -1760,11 +1616,11 @@ func (m *NodeEventMessage) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size()))
|
||||
n12, err := m.Node.MarshalTo(dAtA[i:])
|
||||
n11, err := m.Node.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n12
|
||||
i += n11
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
|
@ -1788,31 +1644,31 @@ func (m *NodeStatus) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size()))
|
||||
n13, err := m.Node.MarshalTo(dAtA[i:])
|
||||
n12, err := m.Node.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n13
|
||||
i += n12
|
||||
}
|
||||
if m.MaxSlices != nil {
|
||||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.MaxSlices.Size()))
|
||||
n14, err := m.MaxSlices.MarshalTo(dAtA[i:])
|
||||
n13, err := m.MaxSlices.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n14
|
||||
i += n13
|
||||
}
|
||||
if m.Schema != nil {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Schema.Size()))
|
||||
n15, err := m.Schema.MarshalTo(dAtA[i:])
|
||||
n14, err := m.Schema.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n15
|
||||
i += n14
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
|
@ -1995,21 +1851,21 @@ func (m *ResizeInstruction) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size()))
|
||||
n16, err := m.Node.MarshalTo(dAtA[i:])
|
||||
n15, err := m.Node.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n16
|
||||
i += n15
|
||||
}
|
||||
if m.Coordinator != nil {
|
||||
dAtA[i] = 0x1a
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Coordinator.Size()))
|
||||
n17, err := m.Coordinator.MarshalTo(dAtA[i:])
|
||||
n16, err := m.Coordinator.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n17
|
||||
i += n16
|
||||
}
|
||||
if len(m.Sources) > 0 {
|
||||
for _, msg := range m.Sources {
|
||||
|
|
@ -2027,21 +1883,21 @@ func (m *ResizeInstruction) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x2a
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Schema.Size()))
|
||||
n18, err := m.Schema.MarshalTo(dAtA[i:])
|
||||
n17, err := m.Schema.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n18
|
||||
i += n17
|
||||
}
|
||||
if m.ClusterStatus != nil {
|
||||
dAtA[i] = 0x32
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.ClusterStatus.Size()))
|
||||
n19, err := m.ClusterStatus.MarshalTo(dAtA[i:])
|
||||
n18, err := m.ClusterStatus.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n19
|
||||
i += n18
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
|
@ -2065,11 +1921,11 @@ func (m *ResizeSource) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size()))
|
||||
n20, err := m.Node.MarshalTo(dAtA[i:])
|
||||
n19, err := m.Node.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n20
|
||||
i += n19
|
||||
}
|
||||
if len(m.Index) > 0 {
|
||||
dAtA[i] = 0x12
|
||||
|
|
@ -2121,11 +1977,11 @@ func (m *ResizeInstructionComplete) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0x12
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.Node.Size()))
|
||||
n21, err := m.Node.MarshalTo(dAtA[i:])
|
||||
n20, err := m.Node.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n21
|
||||
i += n20
|
||||
}
|
||||
if len(m.Error) > 0 {
|
||||
dAtA[i] = 0x1a
|
||||
|
|
@ -2155,11 +2011,11 @@ func (m *SetCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size()))
|
||||
n22, err := m.New.MarshalTo(dAtA[i:])
|
||||
n21, err := m.New.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n22
|
||||
i += n21
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
|
@ -2183,11 +2039,11 @@ func (m *UpdateCoordinatorMessage) MarshalTo(dAtA []byte) (int, error) {
|
|||
dAtA[i] = 0xa
|
||||
i++
|
||||
i = encodeVarintPrivate(dAtA, i, uint64(m.New.Size()))
|
||||
n23, err := m.New.MarshalTo(dAtA[i:])
|
||||
n22, err := m.New.MarshalTo(dAtA[i:])
|
||||
if err != nil {
|
||||
return 0, err
|
||||
}
|
||||
i += n23
|
||||
i += n22
|
||||
}
|
||||
return i, nil
|
||||
}
|
||||
|
|
@ -2459,42 +2315,6 @@ func (m *DeleteFrameMessage) Size() (n int) {
|
|||
return n
|
||||
}
|
||||
|
||||
func (m *CreateBSIGroupMessage) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Index)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
l = len(m.Frame)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
if m.BSIGroup != nil {
|
||||
l = m.BSIGroup.Size()
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *DeleteBSIGroupMessage) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
l = len(m.Index)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
l = len(m.Frame)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
l = len(m.BSIGroup)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPrivate(uint64(l))
|
||||
}
|
||||
return n
|
||||
}
|
||||
|
||||
func (m *Frame) Size() (n int) {
|
||||
var l int
|
||||
_ = l
|
||||
|
|
@ -4304,284 +4124,6 @@ func (m *DeleteFrameMessage) Unmarshal(dAtA []byte) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
func (m *CreateBSIGroupMessage) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowPrivate
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: CreateBSIGroupMessage: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: CreateBSIGroupMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Frame", 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.Frame = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field BSIGroup", wireType)
|
||||
}
|
||||
var msglen int
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowPrivate
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
msglen |= (int(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
if msglen < 0 {
|
||||
return ErrInvalidLengthPrivate
|
||||
}
|
||||
postIndex := iNdEx + msglen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
if m.BSIGroup == nil {
|
||||
m.BSIGroup = &BSIGroup{}
|
||||
}
|
||||
if err := m.BSIGroup.Unmarshal(dAtA[iNdEx:postIndex]); err != nil {
|
||||
return err
|
||||
}
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipPrivate(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPrivate
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *DeleteBSIGroupMessage) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
for iNdEx < l {
|
||||
preIndex := iNdEx
|
||||
var wire uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowPrivate
|
||||
}
|
||||
if iNdEx >= l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
b := dAtA[iNdEx]
|
||||
iNdEx++
|
||||
wire |= (uint64(b) & 0x7F) << shift
|
||||
if b < 0x80 {
|
||||
break
|
||||
}
|
||||
}
|
||||
fieldNum := int32(wire >> 3)
|
||||
wireType := int(wire & 0x7)
|
||||
if wireType == 4 {
|
||||
return fmt.Errorf("proto: DeleteBSIGroupMessage: wiretype end group for non-group")
|
||||
}
|
||||
if fieldNum <= 0 {
|
||||
return fmt.Errorf("proto: DeleteBSIGroupMessage: illegal tag %d (wire type %d)", fieldNum, wire)
|
||||
}
|
||||
switch fieldNum {
|
||||
case 1:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Index", 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.Index = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 2:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Frame", 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.Frame = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 3:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field BSIGroup", 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.BSIGroup = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
default:
|
||||
iNdEx = preIndex
|
||||
skippy, err := skipPrivate(dAtA[iNdEx:])
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if skippy < 0 {
|
||||
return ErrInvalidLengthPrivate
|
||||
}
|
||||
if (iNdEx + skippy) > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
iNdEx += skippy
|
||||
}
|
||||
}
|
||||
|
||||
if iNdEx > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
return nil
|
||||
}
|
||||
func (m *Frame) Unmarshal(dAtA []byte) error {
|
||||
l := len(dAtA)
|
||||
iNdEx := 0
|
||||
|
|
@ -7075,70 +6617,68 @@ var (
|
|||
func init() { proto.RegisterFile("private.proto", fileDescriptorPrivate) }
|
||||
|
||||
var fileDescriptorPrivate = []byte{
|
||||
// 1038 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0x4d, 0x6f, 0x1b, 0xc5,
|
||||
0x1b, 0xff, 0xaf, 0x77, 0xed, 0xd8, 0x4f, 0xfe, 0x0e, 0xc9, 0x94, 0x84, 0x6d, 0x85, 0x82, 0x19,
|
||||
0x55, 0x22, 0x70, 0xb0, 0x4a, 0x7b, 0xe1, 0xad, 0x52, 0x14, 0x3b, 0xc0, 0x22, 0x12, 0xc1, 0x6c,
|
||||
0xd2, 0x03, 0x12, 0x42, 0x53, 0x7b, 0xd4, 0xae, 0xb2, 0xde, 0x31, 0xbb, 0xb3, 0x49, 0xdc, 0x03,
|
||||
0x57, 0xb8, 0x70, 0x47, 0xdc, 0xf8, 0x36, 0x1c, 0xf9, 0x08, 0x28, 0x7c, 0x11, 0x34, 0xcf, 0xcc,
|
||||
0xbe, 0xc4, 0x2f, 0x4d, 0x95, 0x72, 0x9b, 0xe7, 0xfd, 0xed, 0xf7, 0xcc, 0x0c, 0x74, 0xa7, 0x69,
|
||||
0x74, 0xce, 0x95, 0xe8, 0x4f, 0x53, 0xa9, 0x24, 0x69, 0x47, 0x89, 0x12, 0x69, 0xc2, 0x63, 0xba,
|
||||
0x0e, 0x9d, 0x20, 0x19, 0x8b, 0xcb, 0x23, 0xa1, 0x38, 0xfd, 0xc3, 0x81, 0xce, 0xe7, 0x29, 0x9f,
|
||||
0x08, 0x4d, 0x91, 0xb7, 0xa1, 0x33, 0xe0, 0xa3, 0xe7, 0xe2, 0x64, 0x36, 0x15, 0xbe, 0xdb, 0x73,
|
||||
0xf6, 0x3a, 0xac, 0x62, 0x94, 0xd2, 0x30, 0x7a, 0x21, 0x7c, 0xaf, 0xe7, 0xec, 0x75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8, 0xc8, 0x63, 0x68,
|
||||
0x87, 0x8a, 0x27, 0x63, 0x9e, 0x8e, 0x51, 0x69, 0xfd, 0xe1, 0xbb, 0xfd, 0x62, 0xca, 0xfd, 0x52,
|
||||
0xad, 0x5f, 0xe8, 0x1c, 0x26, 0x2a, 0x9d, 0xb1, 0xd2, 0xe4, 0xde, 0xa7, 0xd0, 0xbd, 0x26, 0xd2,
|
||||
0xf1, 0xce, 0xc4, 0xac, 0xe8, 0xea, 0x99, 0x98, 0xe9, 0xfa, 0xcf, 0x79, 0x9c, 0x9b, 0x5e, 0x79,
|
||||
0xcc, 0x10, 0x9f, 0x34, 0x3e, 0x72, 0xe8, 0x3e, 0x90, 0x41, 0x2a, 0xb8, 0x12, 0x18, 0xe4, 0x48,
|
||||
0x64, 0x19, 0x7f, 0x26, 0x56, 0x77, 0xdc, 0x74, 0xb1, 0x51, 0xeb, 0x22, 0xfd, 0x00, 0xc8, 0x50,
|
||||
0xc4, 0x42, 0x09, 0x0b, 0xc6, 0x97, 0x78, 0xa0, 0x61, 0x11, 0xed, 0x66, 0x5d, 0xf2, 0x1e, 0x78,
|
||||
0x1a, 0xcb, 0x18, 0x6c, 0xfd, 0xe1, 0x9d, 0xaa, 0x23, 0x25, 0xe8, 0x19, 0x2a, 0xd0, 0xa8, 0x70,
|
||||
0x6a, 0xf1, 0x7f, 0x43, 0x09, 0x4b, 0x40, 0x53, 0x84, 0x72, 0xe7, 0x43, 0x95, 0x1b, 0x65, 0x43,
|
||||
0xed, 0x17, 0xb5, 0xde, 0x36, 0x14, 0xcd, 0x60, 0xdb, 0x24, 0x7b, 0x10, 0x06, 0x5f, 0xa4, 0x32,
|
||||
0x9f, 0xde, 0x26, 0xdf, 0x3e, 0xb4, 0x0b, 0x73, 0x9b, 0x33, 0xa9, 0x72, 0x2e, 0x24, 0xac, 0xd4,
|
||||
0xa1, 0x3f, 0xc0, 0xb6, 0x49, 0xfb, 0x75, 0x82, 0xde, 0x9b, 0x0b, 0xda, 0xa9, 0x05, 0xf8, 0xce,
|
||||
0x5a, 0xe8, 0x95, 0x3a, 0xd6, 0x96, 0xc6, 0x1f, 0x9e, 0x57, 0x0f, 0x72, 0xae, 0xbb, 0x3a, 0xae,
|
||||
0xde, 0xc1, 0xcc, 0x77, 0x7b, 0xae, 0x8e, 0x8b, 0x04, 0x7d, 0x04, 0xad, 0x70, 0xf4, 0x5c, 0x4c,
|
||||
0x38, 0x79, 0x1f, 0xd6, 0x30, 0x41, 0x91, 0xd9, 0x35, 0x79, 0x63, 0x0e, 0x14, 0xac, 0x90, 0xd3,
|
||||
0xa1, 0x2d, 0x6c, 0x45, 0x42, 0x2d, 0x0c, 0x9d, 0xf9, 0xde, 0xbc, 0x1b, 0xe4, 0x33, 0x2b, 0xa6,
|
||||
0x87, 0xe0, 0x9e, 0xb2, 0x40, 0xaf, 0x3f, 0x66, 0x50, 0x78, 0xb1, 0x94, 0xf6, 0xfd, 0xa5, 0xcc,
|
||||
0x94, 0x6d, 0x13, 0x9e, 0x35, 0xef, 0x1b, 0x99, 0x2a, 0xec, 0x50, 0x97, 0xe1, 0x99, 0x7e, 0x0f,
|
||||
0xde, 0xb1, 0x1c, 0x0b, 0xb2, 0x01, 0x8d, 0x60, 0x68, 0x7d, 0x34, 0x82, 0x21, 0x79, 0x07, 0xdd,
|
||||
0xdb, 0xbe, 0x74, 0xab, 0x24, 0x4e, 0x59, 0xc0, 0x30, 0xf0, 0x7d, 0xe8, 0x06, 0xd9, 0x40, 0xca,
|
||||
0x74, 0x1c, 0x25, 0x5c, 0xc9, 0x14, 0xbd, 0xb6, 0xd9, 0x75, 0x26, 0xdd, 0x87, 0x4d, 0xed, 0x3e,
|
||||
0x54, 0x5c, 0x95, 0x90, 0xdc, 0x81, 0x96, 0xe6, 0x95, 0xe1, 0x2c, 0x85, 0x2b, 0xac, 0xf5, 0x8a,
|
||||
0xd1, 0x22, 0x41, 0xbf, 0x36, 0x1e, 0x0e, 0xcf, 0x45, 0xa2, 0x6a, 0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xde, 0xa9, 0xb4, 0x4d, 0x66, 0x46, 0xcc,
|
||||
0x0a, 0xb5, 0x1a, 0x94, 0x9a, 0x2f, 0x87, 0x12, 0x79, 0x3c, 0x07, 0x25, 0xbf, 0x85, 0x06, 0x6f,
|
||||
0x55, 0x06, 0xd7, 0xc4, 0xec, 0xba, 0x36, 0xfd, 0xc5, 0x81, 0xff, 0xd7, 0x53, 0x78, 0xa5, 0xdd,
|
||||
0x28, 0x27, 0xd2, 0x58, 0x3a, 0x11, 0x77, 0xd9, 0x44, 0xbc, 0x6a, 0x22, 0xd5, 0xab, 0xdd, 0xac,
|
||||
0xbf, 0xda, 0x67, 0x70, 0x77, 0x61, 0x4c, 0x03, 0x39, 0x99, 0x6a, 0x3c, 0xbc, 0xc6, 0xb8, 0xf4,
|
||||
0xad, 0x91, 0xa6, 0x76, 0x50, 0x1d, 0x66, 0x08, 0xfa, 0x31, 0x6c, 0x87, 0x42, 0xd5, 0x86, 0x54,
|
||||
0xa0, 0xad, 0x07, 0xee, 0xb1, 0xb8, 0x58, 0x51, 0xbe, 0x16, 0xd1, 0xcf, 0xc0, 0x3f, 0x9d, 0x8e,
|
||||
0xb9, 0x12, 0xb7, 0xb2, 0x3e, 0x80, 0xf6, 0x89, 0x9c, 0xca, 0x58, 0x3e, 0x9b, 0xdd, 0xb0, 0xf5,
|
||||
0x3e, 0xac, 0x99, 0x2b, 0xd2, 0x7c, 0xe4, 0x3a, 0xac, 0x20, 0xe9, 0x1d, 0x0d, 0xe8, 0x11, 0x8f,
|
||||
0x47, 0x79, 0xac, 0xd3, 0xd0, 0x3f, 0xba, 0xec, 0x60, 0xf3, 0xcf, 0xab, 0x5d, 0xe7, 0xaf, 0xab,
|
||||
0x5d, 0xe7, 0xef, 0xab, 0x5d, 0xe7, 0xb7, 0x7f, 0x76, 0xff, 0xf7, 0xb4, 0x85, 0xdf, 0xf3, 0x47,
|
||||
0xff, 0x06, 0x00, 0x00, 0xff, 0xff, 0xa3, 0xc6, 0x83, 0xfe, 0xaf, 0x0b, 0x00, 0x00,
|
||||
// 1002 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x56, 0xcd, 0x6f, 0x1b, 0x45,
|
||||
0x14, 0x67, 0xbd, 0x6b, 0xc7, 0x7e, 0xc1, 0xc1, 0x99, 0x42, 0xd8, 0x22, 0x14, 0xcc, 0xa8, 0x12,
|
||||
0x86, 0x43, 0x54, 0xda, 0x0b, 0x5f, 0x95, 0xa2, 0xd8, 0x01, 0x16, 0x91, 0x08, 0x66, 0x93, 0x1e,
|
||||
0x90, 0x38, 0x4c, 0xed, 0x51, 0xbb, 0xca, 0x7a, 0xc7, 0xec, 0xce, 0x26, 0x71, 0x0f, 0x5c, 0xe1,
|
||||
0xc2, 0x1d, 0x71, 0xe3, 0xbf, 0xe1, 0xc8, 0x9f, 0x80, 0xc2, 0x3f, 0x82, 0xe6, 0xcd, 0xec, 0x47,
|
||||
0xfc, 0xd1, 0x54, 0xa1, 0xb7, 0x79, 0xbf, 0xf7, 0xfd, 0xde, 0x6f, 0x76, 0x16, 0xba, 0xb3, 0x34,
|
||||
0x3a, 0xe7, 0x4a, 0xec, 0xcd, 0x52, 0xa9, 0x24, 0x69, 0x47, 0x89, 0x12, 0x69, 0xc2, 0x63, 0xba,
|
||||
0x09, 0x9d, 0x20, 0x99, 0x88, 0xcb, 0x23, 0xa1, 0x38, 0xfd, 0xd3, 0x81, 0xce, 0x97, 0x29, 0x9f,
|
||||
0x0a, 0x2d, 0x91, 0x77, 0xa1, 0x33, 0xe4, 0xe3, 0x67, 0xe2, 0x64, 0x3e, 0x13, 0xbe, 0xdb, 0x77,
|
||||
0x06, 0x1d, 0x56, 0x01, 0xa5, 0x36, 0x8c, 0x9e, 0x0b, 0xdf, 0xeb, 0x3b, 0x83, 0x2e, 0xab, 0x00,
|
||||
0xd2, 0x87, 0xcd, 0x93, 0x68, 0x2a, 0xbe, 0xcf, 0x79, 0xa2, 0xf2, 0xa9, 0xdf, 0x44, 0xef, 0x3a,
|
||||
0x44, 0x08, 0x78, 0x18, 0xb8, 0x8d, 0x2a, 0x3c, 0x93, 0x1e, 0xb8, 0x47, 0x51, 0xe2, 0x77, 0xfa,
|
||||
0xce, 0xc0, 0x65, 0xfa, 0x88, 0x08, 0xbf, 0xf4, 0xc1, 0x22, 0xfc, 0x92, 0x52, 0xd8, 0x0a, 0xa6,
|
||||
0x33, 0x99, 0x2a, 0x26, 0xb2, 0x99, 0x4c, 0x32, 0xf4, 0x3a, 0x4c, 0x53, 0xdf, 0xc1, 0x40, 0xfa,
|
||||
0x48, 0x7f, 0x86, 0xde, 0x41, 0x2c, 0xc7, 0x67, 0x23, 0xae, 0x38, 0x13, 0x3f, 0xe5, 0x22, 0x53,
|
||||
0xe4, 0x4d, 0x68, 0x62, 0xa3, 0xd6, 0xce, 0x08, 0x1a, 0xc5, 0x86, 0xfd, 0x86, 0x41, 0x51, 0xd0,
|
||||
0x28, 0xfa, 0x63, 0xd7, 0x1e, 0x33, 0x82, 0x46, 0xc3, 0x38, 0x1a, 0x9b, 0x6e, 0x3d, 0x66, 0x04,
|
||||
0xdd, 0xc7, 0xe3, 0x48, 0x5c, 0xd8, 0x16, 0xf1, 0x4c, 0x03, 0xd8, 0xae, 0xe5, 0xb7, 0x65, 0xee,
|
||||
0x40, 0x8b, 0xc9, 0x8b, 0x60, 0x94, 0xf9, 0x4e, 0xdf, 0x1d, 0x78, 0xcc, 0x4a, 0x38, 0x48, 0x19,
|
||||
0xe7, 0xd3, 0x44, 0xab, 0x1a, 0xa8, 0xaa, 0x00, 0x7a, 0x17, 0x9a, 0x38, 0x55, 0xdd, 0x65, 0xe5,
|
||||
0xab, 0x8f, 0xf4, 0x17, 0x07, 0x3a, 0x47, 0xfc, 0x12, 0xcb, 0xc8, 0xc8, 0x23, 0x68, 0x87, 0x8a,
|
||||
0x27, 0x13, 0x9e, 0x4e, 0xd0, 0x68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 0x6e,
|
||||
0xc4, 0x5d, 0xb5, 0x11, 0xaf, 0xda, 0x48, 0xf5, 0xbe, 0x35, 0xeb, 0xef, 0xdb, 0x19, 0xdc, 0x5d,
|
||||
0x5a, 0xd3, 0x50, 0x4e, 0x67, 0x9a, 0x0f, 0xff, 0x63, 0x5d, 0xfa, 0xab, 0x91, 0xa6, 0x76, 0x51,
|
||||
0x1d, 0x66, 0x04, 0xfa, 0x29, 0xbc, 0x15, 0x0a, 0x55, 0x5b, 0x52, 0xc1, 0xb6, 0x3e, 0xb8, 0xc7,
|
||||
0xe2, 0x62, 0x4d, 0xfb, 0x5a, 0x45, 0xbf, 0x00, 0xff, 0x74, 0x36, 0xe1, 0x4a, 0xdc, 0xca, 0xfb,
|
||||
0x00, 0xda, 0x27, 0x72, 0x26, 0x63, 0xf9, 0x74, 0x7e, 0xc3, 0xad, 0xf7, 0x61, 0xc3, 0x7c, 0x22,
|
||||
0xcd, 0x2f, 0x4f, 0x87, 0x15, 0x22, 0xbd, 0xa3, 0x09, 0x3d, 0xe6, 0xf1, 0x38, 0x8f, 0x75, 0x19,
|
||||
0xfa, 0xdf, 0x27, 0x3b, 0xe8, 0xfd, 0x75, 0xb5, 0xeb, 0xfc, 0x7d, 0xb5, 0xeb, 0xfc, 0x73, 0xb5,
|
||||
0xeb, 0xfc, 0xfe, 0xef, 0xee, 0x6b, 0x4f, 0x5a, 0xf8, 0x23, 0xfb, 0xf0, 0xbf, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x93, 0x15, 0x15, 0x14, 0xd9, 0x0a, 0x00, 0x00,
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,18 +64,6 @@ message DeleteFrameMessage {
|
|||
string Frame = 2;
|
||||
}
|
||||
|
||||
message CreateBSIGroupMessage {
|
||||
string Index = 1;
|
||||
string Frame = 2;
|
||||
BSIGroup BSIGroup = 3;
|
||||
}
|
||||
|
||||
message DeleteBSIGroupMessage {
|
||||
string Index = 1;
|
||||
string Frame = 2;
|
||||
string BSIGroup = 3;
|
||||
}
|
||||
|
||||
message Frame {
|
||||
string Name = 1;
|
||||
FrameMeta Meta = 2;
|
||||
|
|
|
|||
|
|
@ -485,7 +485,6 @@ type ImportValueRequest struct {
|
|||
Index string `protobuf:"bytes,1,opt,name=Index,proto3" json:"Index,omitempty"`
|
||||
Frame string `protobuf:"bytes,2,opt,name=Frame,proto3" json:"Frame,omitempty"`
|
||||
Slice uint64 `protobuf:"varint,3,opt,name=Slice,proto3" json:"Slice,omitempty"`
|
||||
Field string `protobuf:"bytes,4,opt,name=Field,proto3" json:"Field,omitempty"`
|
||||
ColumnIDs []uint64 `protobuf:"varint,5,rep,packed,name=ColumnIDs" json:"ColumnIDs,omitempty"`
|
||||
ColumnKeys []string `protobuf:"bytes,7,rep,name=ColumnKeys" json:"ColumnKeys,omitempty"`
|
||||
Values []int64 `protobuf:"varint,6,rep,packed,name=Values" json:"Values,omitempty"`
|
||||
|
|
@ -517,13 +516,6 @@ func (m *ImportValueRequest) GetSlice() uint64 {
|
|||
return 0
|
||||
}
|
||||
|
||||
func (m *ImportValueRequest) GetField() string {
|
||||
if m != nil {
|
||||
return m.Field
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func (m *ImportValueRequest) GetColumnIDs() []uint64 {
|
||||
if m != nil {
|
||||
return m.ColumnIDs
|
||||
|
|
@ -1190,12 +1182,6 @@ func (m *ImportValueRequest) MarshalTo(dAtA []byte) (int, error) {
|
|||
i++
|
||||
i = encodeVarintPublic(dAtA, i, uint64(m.Slice))
|
||||
}
|
||||
if len(m.Field) > 0 {
|
||||
dAtA[i] = 0x22
|
||||
i++
|
||||
i = encodeVarintPublic(dAtA, i, uint64(len(m.Field)))
|
||||
i += copy(dAtA[i:], m.Field)
|
||||
}
|
||||
if len(m.ColumnIDs) > 0 {
|
||||
dAtA14 := make([]byte, len(m.ColumnIDs)*10)
|
||||
var j13 int
|
||||
|
|
@ -1545,10 +1531,6 @@ func (m *ImportValueRequest) Size() (n int) {
|
|||
if m.Slice != 0 {
|
||||
n += 1 + sovPublic(uint64(m.Slice))
|
||||
}
|
||||
l = len(m.Field)
|
||||
if l > 0 {
|
||||
n += 1 + l + sovPublic(uint64(l))
|
||||
}
|
||||
if len(m.ColumnIDs) > 0 {
|
||||
l = 0
|
||||
for _, e := range m.ColumnIDs {
|
||||
|
|
@ -3507,35 +3489,6 @@ func (m *ImportValueRequest) Unmarshal(dAtA []byte) error {
|
|||
break
|
||||
}
|
||||
}
|
||||
case 4:
|
||||
if wireType != 2 {
|
||||
return fmt.Errorf("proto: wrong wireType = %d for field Field", wireType)
|
||||
}
|
||||
var stringLen uint64
|
||||
for shift := uint(0); ; shift += 7 {
|
||||
if shift >= 64 {
|
||||
return ErrIntOverflowPublic
|
||||
}
|
||||
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 ErrInvalidLengthPublic
|
||||
}
|
||||
postIndex := iNdEx + intStringLen
|
||||
if postIndex > l {
|
||||
return io.ErrUnexpectedEOF
|
||||
}
|
||||
m.Field = string(dAtA[iNdEx:postIndex])
|
||||
iNdEx = postIndex
|
||||
case 5:
|
||||
if wireType == 0 {
|
||||
var v uint64
|
||||
|
|
@ -3818,50 +3771,49 @@ var (
|
|||
func init() { proto.RegisterFile("public.proto", fileDescriptorPublic) }
|
||||
|
||||
var fileDescriptorPublic = []byte{
|
||||
// 709 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x55, 0xcd, 0x6e, 0xd3, 0x4c,
|
||||
0x14, 0xfd, 0x26, 0x76, 0xfe, 0x6e, 0x9a, 0x7c, 0xd5, 0xe8, 0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 0x51, 0xcf, 0xb0, 0x0d, 0x34, 0xf6, 0x62, 0x68, 0x02, 0x1d, 0x7c, 0x67, 0x30, 0x9c,
|
||||
0xcd, 0x33, 0x95, 0xeb, 0x46, 0x48, 0x66, 0xe9, 0x85, 0xbc, 0xb2, 0x21, 0x21, 0x80, 0xec, 0x41,
|
||||
0x1e, 0xcd, 0xcd, 0x34, 0xf4, 0x85, 0x01, 0xc8, 0x52, 0x58, 0x28, 0x1c, 0xae, 0x30, 0x80, 0x62,
|
||||
0x81, 0xf3, 0x5e, 0x78, 0xae, 0x09, 0x94, 0x41, 0x18, 0x7f, 0x3b, 0xee, 0x85, 0xd7, 0x26, 0xa9,
|
||||
0x26, 0x30, 0xfe, 0xab, 0x79, 0xc7, 0xbc, 0x38, 0xa1, 0x23, 0x1a, 0x0c, 0xbe, 0x83, 0x50, 0x0b,
|
||||
0xfa, 0xc8, 0x75, 0xe9, 0x23, 0x67, 0x21, 0x9e, 0x34, 0x65, 0x48, 0xec, 0x91, 0xd8, 0x60, 0x82,
|
||||
0x2f, 0x0c, 0xb8, 0xf1, 0x48, 0x83, 0xf4, 0xf7, 0x8c, 0xe2, 0xde, 0x58, 0x26, 0xa6, 0x31, 0xb8,
|
||||
0x17, 0xc1, 0x6f, 0x6c, 0x6e, 0x41, 0x87, 0x6e, 0x61, 0x2d, 0x56, 0x68, 0xcd, 0x44, 0x77, 0xdd,
|
||||
0xc4, 0xce, 0xe6, 0xf5, 0xcd, 0x98, 0x7d, 0xbd, 0x19, 0xb3, 0x6f, 0x37, 0x63, 0xf6, 0xf1, 0xc7,
|
||||
0xf8, 0x9f, 0xb3, 0x0e, 0xfd, 0x95, 0x3c, 0xf9, 0x19, 0x00, 0x00, 0xff, 0xff, 0x03, 0x56, 0xc7,
|
||||
0xa4, 0x5a, 0x06, 0x00, 0x00,
|
||||
// 701 bytes of a gzipped FileDescriptorProto
|
||||
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x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|||
|
|
@ -83,7 +83,6 @@ message ImportValueRequest {
|
|||
string Index = 1;
|
||||
string Frame = 2;
|
||||
uint64 Slice = 3;
|
||||
string Field = 4;
|
||||
repeated uint64 ColumnIDs = 5;
|
||||
repeated string ColumnKeys = 7;
|
||||
repeated int64 Values = 6;
|
||||
|
|
|
|||
11
server.go
11
server.go
|
|
@ -470,17 +470,6 @@ func (s *Server) ReceiveMessage(pb proto.Message) error {
|
|||
if err := idx.DeleteFrame(obj.Frame); err != nil {
|
||||
return err
|
||||
}
|
||||
case *internal.CreateBSIGroupMessage:
|
||||
f := s.Holder.Frame(obj.Index, obj.Frame)
|
||||
field := decodeBSIGroup(obj.BSIGroup)
|
||||
if err := f.createBSIGroup(field); err != nil {
|
||||
return err
|
||||
}
|
||||
case *internal.DeleteBSIGroupMessage:
|
||||
f := s.Holder.Frame(obj.Index, obj.Frame)
|
||||
if err := f.deleteBSIGroupAndView(obj.BSIGroup); err != nil {
|
||||
return err
|
||||
}
|
||||
case *internal.CreateViewMessage:
|
||||
f := s.Holder.Frame(obj.Index, obj.Frame)
|
||||
if f == nil {
|
||||
|
|
|
|||
12
view.go
12
view.go
|
|
@ -330,7 +330,7 @@ func (v *View) value(columnID uint64, bitDepth uint) (value uint64, exists bool,
|
|||
if err != nil {
|
||||
return value, exists, err
|
||||
}
|
||||
return frag.FieldValue(columnID, bitDepth)
|
||||
return frag.Value(columnID, bitDepth)
|
||||
}
|
||||
|
||||
// setValue uses a column of bits to set a multi-bit value.
|
||||
|
|
@ -346,7 +346,7 @@ func (v *View) setValue(columnID uint64, bitDepth uint, value uint64) (changed b
|
|||
// sum returns the sum & count of a field.
|
||||
func (v *View) sum(filter *Row, bitDepth uint) (sum, count uint64, err error) {
|
||||
for _, f := range v.Fragments() {
|
||||
fsum, fcount, err := f.FieldSum(filter, bitDepth)
|
||||
fsum, fcount, err := f.Sum(filter, bitDepth)
|
||||
if err != nil {
|
||||
return sum, count, err
|
||||
}
|
||||
|
|
@ -360,7 +360,7 @@ func (v *View) sum(filter *Row, bitDepth uint) (sum, count uint64, err error) {
|
|||
func (v *View) min(filter *Row, bitDepth uint) (min, count uint64, err error) {
|
||||
var minHasValue bool
|
||||
for _, f := range v.Fragments() {
|
||||
fmin, fcount, err := f.FieldMin(filter, bitDepth)
|
||||
fmin, fcount, err := f.Min(filter, bitDepth)
|
||||
if err != nil {
|
||||
return min, count, err
|
||||
}
|
||||
|
|
@ -387,7 +387,7 @@ func (v *View) min(filter *Row, bitDepth uint) (min, count uint64, err error) {
|
|||
// max returns the max and count of a field.
|
||||
func (v *View) max(filter *Row, bitDepth uint) (max, count uint64, err error) {
|
||||
for _, f := range v.Fragments() {
|
||||
fmax, fcount, err := f.FieldMax(filter, bitDepth)
|
||||
fmax, fcount, err := f.Max(filter, bitDepth)
|
||||
if err != nil {
|
||||
return max, count, err
|
||||
}
|
||||
|
|
@ -403,7 +403,7 @@ func (v *View) max(filter *Row, bitDepth uint) (max, count uint64, err error) {
|
|||
func (v *View) rangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, error) {
|
||||
r := NewRow()
|
||||
for _, frag := range v.Fragments() {
|
||||
other, err := frag.FieldRange(op, bitDepth, predicate)
|
||||
other, err := frag.RangeOp(op, bitDepth, predicate)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
@ -417,7 +417,7 @@ func (v *View) rangeOp(op pql.Token, bitDepth uint, predicate uint64) (*Row, err
|
|||
func (v *View) rangeBetween(bitDepth uint, predicateMin, predicateMax uint64) (*Row, error) {
|
||||
r := NewRow()
|
||||
for _, frag := range v.Fragments() {
|
||||
other, err := frag.FieldRangeBetween(bitDepth, predicateMin, predicateMax)
|
||||
other, err := frag.RangeBetween(bitDepth, predicateMin, predicateMax)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue