Skip to content

Commit

Permalink
fix: partialColFrom ok
Browse files Browse the repository at this point in the history
  • Loading branch information
DuanKuanJun committed Oct 22, 2023
1 parent 98d65ce commit ee32063
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions example/insertFuns.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
"insert_rows": 900000000000000,
"interlace_rows": 1,
"insert_interval": 1000,
"partial_col_num": 2,
"partial_col_from": 3,
"start_timestamp": "now",
"sample_format": "csv",
"sample_file": "./sample.csv",
Expand All @@ -56,11 +58,10 @@
{ "type": "FLOAT", "name": "current", "fun": "3*sin(x)+10*random(2)"},
{ "type": "INT", "name": "voltage", "fun": "40*sin(x)+200*random(10)"},
{ "type": "FLOAT", "name": "phase", "fun": "1*sin(x)+1*random(3)"},
{ "type": "INT", "name": "c1", "fun": "count(0,100,1,0)"},
{ "type": "INT", "name": "c2", "fun": "saw(-100,100,20,0)"},
{ "type": "INT", "name": "c3", "fun": "square(0,60,20,10)"},
{ "type": "INT", "name": "c4", "fun": "tri(-20,100,30,10)"}
],
{ "type": "INT", "name": "c1", "fun": "count(0,100,1,0) + 100"},
{ "type": "INT", "name": "c2", "fun": "saw(-100,100,20,0) + 1000"},
{ "type": "float", "name": "c3", "fun": "square(0,50,10,3)+20+ 80"},
{ "type": "INT", "name": "c4", "fun": "tri(-20,40,20,5)+50*random(12)+ 10000"} ],
"tags": [
{
"type": "TINYINT",
Expand Down
2 changes: 1 addition & 1 deletion src/benchData.c
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ int prepareSampleData(SDataBase* database, SSuperTable* stbInfo) {
}

// first part set noen
for (uint32_t i = 0; i <= stbInfo->partialColFrom; ++i) {
for (uint32_t i = 0; i < stbInfo->partialColFrom; ++i) {
Field * col = benchArrayGet(stbInfo->cols, i);
col->none = true;
}
Expand Down

0 comments on commit ee32063

Please sign in to comment.