Skip to content

Commit 26bd756

Browse files
authored
Merge pull request #581 from v3io/development
dev
2 parents 1f81879 + 0db3396 commit 26bd756

File tree

9 files changed

+18
-8
lines changed

9 files changed

+18
-8
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -849,7 +849,7 @@ The following `execute` commands are specific to the `stream` backend; for more
849849
```python
850850
client.execute('stream', table="mystream", command='put',
851851
args={'data': '{"cpu": 12.4, "mem": 31.1, "disk": 12.7}',
852-
"client_info": "my custom info", "partition": "PK1"})
852+
"client_info": "my custom info", "partition_key": "PK1"})
853853
```
854854

855855
<a id="method-history"></a>

backends/kv/inferschema.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ func schemaFromKeys(keyField string, rowSet []map[string]interface{}) (v3ioutils
185185
}
186186
} else {
187187
if val, ok := columnCanBeFullKey[keyField]; !ok || !val {
188-
return nil, errors.Errorf("%s is not one of the columns", keyField)
188+
return nil, errors.Errorf("%s is not one of the optional key columns", keyField)
189189
}
190190
}
191191

backends/kv/inferschema_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ func (suite *InferSchemaTestSuite) TestInferSchemaWithInvalidKey() {
268268
}
269269
_, err := schemaFromKeys(keyField, rowSet)
270270
suite.Require().Error(err)
271-
suite.Require().Equal("invalid_key is not one of the columns", err.Error())
271+
suite.Require().Equal("invalid_key is not one of the optional key columns", err.Error())
272272
}
273273

274274
func TestInferSchemaTestSuite(t *testing.T) {

backends/stream/backend.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ func (b *Backend) put(request *frames.ExecRequest) error {
134134
}
135135

136136
partitionKey := ""
137-
if val, ok := request.Proto.Args["partition"]; ok {
137+
if val, ok := request.Proto.Args["partition_key"]; ok {
138138
partitionKey = val.GetSval()
139139
}
140140

@@ -143,7 +143,7 @@ func (b *Backend) put(request *frames.ExecRequest) error {
143143
return err
144144
}
145145

146-
b.logger.DebugWith("put record", "path", path, "len", len(data), "client", clientInfo, "partition", partitionKey)
146+
b.logger.DebugWith("put record", "path", path, "len", len(data), "client", clientInfo, "partition_key", partitionKey)
147147
records := []*v3io.StreamRecord{{
148148
Data: []byte(data), ClientInfo: []byte(clientInfo), PartitionKey: partitionKey,
149149
}}

backends/stream/reader.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ var allowedReadRequestFields = map[string]bool{
4747
"Seek": true,
4848
"ShardId": true,
4949
"Sequence": true,
50+
"Start": true,
5051
}
5152

5253
func (b *Backend) Read(request *frames.ReadRequest) (frames.FrameIterator, error) {

clients/py/Pipfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ name = "pypi"
55

66
[packages]
77
googleapis-common-protos = ">=1.5.3"
8-
grpcio-tools = ">=1.26.0"
8+
grpcio-tools = "==1.30.0"
9+
grpcio = "==1.30.0"
910
pandas = ">=0.23.4"
1011
requests = ">=2.19.1"
1112

go.mod

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ require (
1212
github.com/pkg/errors v0.8.1
1313
github.com/stretchr/testify v1.4.0
1414
github.com/v3io/v3io-go v0.1.9
15-
github.com/v3io/v3io-tsdb v0.11.5
15+
github.com/v3io/v3io-tsdb v0.11.6
1616
github.com/valyala/fasthttp v1.2.0
1717
github.com/xwb1989/sqlparser v0.0.0-20180606152119-120387863bf2
1818
golang.org/x/net v0.0.0-20190311183353-d8887717615a
@@ -22,4 +22,5 @@ require (
2222
replace (
2323
github.com/v3io/frames => ./
2424
github.com/xwb1989/sqlparser => github.com/v3io/sqlparser v0.0.0-20190306105200-4d7273501871
25+
github.com/v3io/v3io-go => github.com/v3io/v3io-go v0.2.4-0.20201209122348-e01fabe35df8
2526
)

go.sum

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,14 @@ github.com/v3io/sqlparser v0.0.0-20190306105200-4d7273501871 h1:myF4tU/HdFWU1UzM
6868
github.com/v3io/sqlparser v0.0.0-20190306105200-4d7273501871/go.mod h1:QD2Bo64oyTWzeV8RFehXS0hZEDFgOK99/h2a6ErRu6E=
6969
github.com/v3io/v3io-go v0.1.9 h1:etkrrRmrI++i8sxGfK/+13f41TxIMohYeZHwVUM62vw=
7070
github.com/v3io/v3io-go v0.1.9/go.mod h1:5poBlcjZG5TiexRTYI44PE6tHzZz5Z60w+iS899pWtc=
71+
github.com/v3io/v3io-go v0.2.4-0.20201209122348-e01fabe35df8 h1:Bg3LtR/4cH9mGWTWKGeEZcf7Z88whuf4mufSnj5S4qg=
72+
github.com/v3io/v3io-go v0.2.4-0.20201209122348-e01fabe35df8/go.mod h1:WGxAG5MfZ5FeeZa7yGzocW+iLxTlrpkOWdnCIty4QDc=
7173
github.com/v3io/v3io-tsdb v0.11.3 h1:zH2rVNsPy9CIm0/gwJ7NNyjDD7G2w4XhUygeZqexLaE=
7274
github.com/v3io/v3io-tsdb v0.11.3/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
7375
github.com/v3io/v3io-tsdb v0.11.4 h1:tDw+EdFNregIy6r4fPqtOybkAj4ngUl4WRQNH24Xe0M=
7476
github.com/v3io/v3io-tsdb v0.11.4/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
7577
github.com/v3io/v3io-tsdb v0.11.5/go.mod h1:kp586KxTfROIGwb/nzNxwDbX2Wterxro+HbiZHmK548=
78+
github.com/v3io/v3io-tsdb v0.11.6/go.mod h1:uyk46LJxROChqmlhg5M5Kw7qK1WfJD3hrqNHR6kLjeg=
7679
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
7780
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
7881
github.com/valyala/fasthttp v1.2.0 h1:dzZJf2IuMiclVjdw0kkT+f9u4YdrapbNyGAN47E/qnk=

rowiter.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,11 @@ func (it *rowIterator) init() {
8282
for i, col := range it.frame.Indices() {
8383
name := col.Name()
8484
if name == "" {
85-
name = fmt.Sprintf("index-%d", i)
85+
if i == 0 {
86+
name = "idx"
87+
} else {
88+
name = fmt.Sprintf("idx-%d", i)
89+
}
8690
noNames[it.numCols+i] = name
8791
}
8892

0 commit comments

Comments
 (0)